OperatorPending mode is not correctly reflected
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
I have a keybinding which allows me to hit Escape to switch focus to the file explorer:
{
"key": "escape",
"command": "workbench.view.explorer",
"when": "editorFocus && vim.mode == 'Normal' && !editorHasMultipleSelections && !dirtyDiffVisible && !referenceSearchVisible && !findWidgetVisible"
}
The problem i experience is that this command will be executed when vim is in OperatorPending mode. For example, when i accidentially hit y in Normal mode, then hit Escape, the keybinding above will trigger. This means that, while vim correctly waits for the motion command, it does not set the when clause context vim.mode correctly.
Expected behavior
vim.mode should not equal Normal during operator pending state.
- Extension (VsCodeVim) version: v1.24.1
- VSCode version: 1.72.0
- OS: macOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue identifies the vim.mode when-clause context and the OperatorPending mode; start by tracing where mode changes are exposed to VS Code keybindings. Reproduce the y then Escape sequence, then verify that vim.mode is not Normal while waiting for a motion and that the reported context matches the actual mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100