From 07ea9f3825bbc167b48c348dff56e59b904b078f Mon Sep 17 00:00:00 2001 From: Saul Reynolds-Haertle Date: Mon, 16 Mar 2020 17:24:53 -0700 Subject: [PATCH 1/2] Return keys=[] from parser so things don't blow up if exstr is "" --- src/lib/keyseq.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/keyseq.ts b/src/lib/keyseq.ts index c9dfe98e..1b6674f8 100644 --- a/src/lib/keyseq.ts +++ b/src/lib/keyseq.ts @@ -169,6 +169,7 @@ export function parse(keyseq: KeyEventLike[], map: KeyMap): ParserResponse { exstr: perfect[1] + numericPrefixToExstrSuffix(numericPrefix), isMatch: true, numericPrefix: numericPrefix.length ? Number(numericPrefix.map(ke => ke.key).join("")) : undefined, + keys: [], } } catch (e) { if (!(e instanceof RangeError)) throw e From 7802c9a83ced982401de335b311c95e073d7d694 Mon Sep 17 00:00:00 2001 From: Oliver Blanthorn Date: Fri, 20 Mar 2020 10:33:34 +0000 Subject: [PATCH 2/2] Fix unbindurl: set unbound key to null --- src/excmds.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/excmds.ts b/src/excmds.ts index 971bf55e..13b16e78 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -3452,7 +3452,7 @@ export async function unbind(...args: string[]) { export async function unbindurl(pattern: string, mode: string, keys: string) { const args_obj = parse_bind_args(mode, keys) - return config.setURL(pattern, args_obj.configName, args_obj.key, "") + return config.setURL(pattern, args_obj.configName, args_obj.key, null) } /**