Set vim.command in VSCodeContext on key press. (#8718)

This commit is contained in:
Raine Revere 2024-07-01 21:34:27 -04:00 committed by GitHub
parent 0e5cd66f53
commit 79e00fea76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: