Failed to handle key `u`: TextEditor(vs.editor.ICodeEditor:1,$model25) has been disposed
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
To Reproduce
Steps to reproduce the behavior:
- Go to any file
- Click on 'u'
- Sometimes, the plugin will start entering new lines everywhere
- Close the file to see the error.
VSCodeVim version: 1.24.3
Stack trace
DISPOSED: TextEditor(vs.editor.ICodeEditor:1,$model25) has been disposed
at g (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:10:1616)
at uc.$tryApplyEdits (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2299:13996)
at m.N (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1573:15220)
at m.M (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1573:14938)
at m.H (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1573:14031)
at m.G (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1573:13012)
at vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1573:11800
at g.invoke (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:86:145)
at n.deliver (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:86:2029)
at a.fire (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:86:1667)
at r.fire (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:553:15219)
at Z.onmessage (vscode-file://vscode-app/c:/Users/JesusHernandez/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1671:1490)
The only quick remedy I had is to close the file quickly and revert the newline changes. It starts at the bottom of the file regardless of where I press 'u'.

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
Start by reproducing the intermittent Windows behavior using the listed steps, then inspect the provided disposed-TextEditor stack trace and VSCodeVim version context. Compare behavior before and after closing the file; done means pressing u no longer inserts new lines throughout the file or attempts edits on a disposed editor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100