From 79e00fea76572413909be5dedf3a8831645b7057 Mon Sep 17 00:00:00 2001 From: Raine Revere Date: Mon, 1 Jul 2024 21:34:27 -0400 Subject: [PATCH] Set `vim.command` in `VSCodeContext` on key press. (#8718) --- src/mode/modeHandler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index 24a7e5e76..7257f3129 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -640,6 +640,7 @@ export class ModeHandler implements vscode.Disposable, IModeHandler { const recordedState = this.vimState.recordedState; recordedState.actionKeys.push(key); + VSCodeContext.set('vim.command', recordedState.commandString); const action = getRelevantAction(recordedState.actionKeys, this.vimState); switch (action) { @@ -651,6 +652,7 @@ export class ModeHandler implements vscode.Disposable, IModeHandler { } // Since there is no possible action we are no longer waiting any action keys this.vimState.recordedState.waitingForAnotherActionKey = false; + VSCodeContext.set('vim.command', ''); return false; case KeypressState.WaitingOnKeys: