Don't count unfinished key-sequences towards n in nmode

This commit is contained in:
Oliver Blanthorn 2020-05-09 11:56:23 +01:00
parent 2fead0aa78
commit 2eb046affb
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -39,7 +39,7 @@ export function parser(keys: KeyboardEvent[]) {
}
const response = keyseq.parse(keys, maps)
if (response.exstr != "") modeState.curCommands += 1
if ((response.exstr !== undefined && response.isMatch) || !response.isMatch) modeState.curCommands += 1
if (modeState.curCommands >= modeState.numCommands) {
const prefix =
(response.exstr === undefined) ? "" : ("composite " + response.exstr + "; ")