fix kiss-vscode multi-keystroke shortcuts

This commit is contained in:
2021-06-25 20:35:42 -06:00
parent 1602b873bc
commit 00c1665f6f

View File

@@ -111,13 +111,13 @@
(.dispose (the WebviewPanel shortcutPanel)) (.dispose (the WebviewPanel shortcutPanel))
(set shortcutPanel null)) (set shortcutPanel null))
(set prefixMap commandShortcuts)) (set prefixMap commandShortcuts))
(unless shortcutPanel (when shortcutPanel (shortcutPanel.dispose))
(set shortcutPanel (Vscode.window.createWebviewPanel (set shortcutPanel (Vscode.window.createWebviewPanel
"kissShortcut" "kissShortcut"
"Kiss Shortcuts" "Kiss Shortcuts"
vscode.ViewColumn.Two vscode.ViewColumn.Two
(object (object
enableScripts true)))) enableScripts true)))
(let [&mut keyListener null] (let [&mut keyListener null]
(set keyListener (shortcutPanel.webview.onDidReceiveMessage (set keyListener (shortcutPanel.webview.onDidReceiveMessage
->key (if (prefixMap.exists key) ->key (if (prefixMap.exists key)