Skip to content

Commit

Permalink
Set vim.command in VSCodeContext on key press.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Feb 22, 2024
1 parent c8bdc80 commit 0eb3921
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mode/modeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,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) {
Expand All @@ -617,6 +618,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:
Expand Down

0 comments on commit 0eb3921

Please sign in to comment.