Failed to handle key=d. argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true
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:
- set user settings
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [
"<leader>",
"f",
"d"
],
"commands": [
"editor.fold"
],
},
]
- when I use it in code, vscode generated the following error.
VSCodeVim version: 1.21.7
Stack trace
Error: argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true
at n (vscode-file://vscode-app/d:/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:70:67572)
at r (vscode-file://vscode-app/d:/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:70:67299)
at E.handler (vscode-file://vscode-app/d:/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:596:19224)
at g.invokeFunction (vscode-file://vscode-app/d:/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:600:319)
at g._tryExecuteCommand (vscode-file://vscode-app/d:/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1476:3496)
at vscode-file://vscode-app/d:/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1476:3245
at processTicksAndRejections (internal/process/task_queues.js:93:5)
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
Reproduce the issue using the shown vim.normalModeKeyBindingsNonRecursive setting and the editor.fold command in VS Code. Start by tracing how the key sequence is converted into the command invocation, using the reported constraint error as the symptom. Done means the keybinding executes editor.fold without producing the constraint error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100