From 2eb046affbd4911588e96320787557b87e75f4a4 Mon Sep 17 00:00:00 2001 From: Oliver Blanthorn Date: Sat, 9 May 2020 11:56:23 +0100 Subject: [PATCH] Don't count unfinished key-sequences towards n in nmode --- src/parsers/nmode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parsers/nmode.ts b/src/parsers/nmode.ts index 4412355c..5146bb90 100644 --- a/src/parsers/nmode.ts +++ b/src/parsers/nmode.ts @@ -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 + "; ")