Skip to content

Commit

Permalink
Merge pull request #234 from runforprogram/master
Browse files Browse the repository at this point in the history
[VIM-1991] fix >0 number register not work
  • Loading branch information
AlexPl292 authored Apr 17, 2020
2 parents 613c234 + 962cfb7 commit 4ec0bac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/com/maddyhome/idea/vim/KeyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ private boolean handleAbandonedMappingSequence(@NotNull Editor editor,
private boolean isCommandCountKey(char chKey, @NotNull CommandState editorState) {
// Make sure to avoid handling '0' as the start of a count.
final CommandBuilder commandBuilder = editorState.getCommandBuilder();
return (editorState.getMode() == CommandState.Mode.COMMAND || editorState.getMode() == CommandState.Mode.VISUAL)
return ((editorState.getMode() == CommandState.Mode.COMMAND
&&editorState.getSubMode()!=CommandState.SubMode.REGISTER_PENDING)
|| editorState.getMode() == CommandState.Mode.VISUAL)
&& commandBuilder.isExpectingCount() && Character.isDigit(chKey) && (commandBuilder.getCount() > 0 || chKey != '0');
}

Expand Down

0 comments on commit 4ec0bac

Please sign in to comment.