Fold commands (zo, zc) are broken in v1.24.3
Open
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
Analog to #7797 Im getting the following error when trying to zo, zc
Failed to handle key `c`: argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true
To Reproduce
Steps to reproduce the behavior:
- Enable
.vimrcsupport - create following mappings:
nnoremap zc editor.fold
nnoremap zo editor.unfold
zo/zcinside a codeblock/function- See error popup, codeblock not folded
Expected behavior
Codeblock folded
Environment (please complete the following information):
- Extension (VsCodeVim) version: v1.24.3
- VSCode version: 1.73
- OS: windows 10
Additional Notes
- VScode keyboard shortcuts fold as expected using same command id
- rebinding to other keys does not help
- The following
editor.(un-)foldAllmappings work as expected
nnoremap <leader>zc editor.foldAll
nnoremap <Leader>zo editor.unfoldAll
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 with VSCodeVim v1.24.3 by enabling .vimrc support and mapping zo to editor.fold and zc to editor.unfold inside a code block or function. Compare these mappings with the working editor.foldAll and editor.unfoldAll mappings; done means zo and zc fold and unfold without the argument-constraint error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100