VSCodeVim / VSCodeVim/Vim

Failed to handle key ``: nvim_buf_set_lines: Buffer is not 'modifiable'

Open
#7,312 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/neovim kind/bug
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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

VSCodeVim version: 1.21.10

Stack trace
Error: Error making request to nvim_buf_set_lines
    at c.request (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/node_modules/neovim/lib/api/Base.js:75:23)
    at c.setLines (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/node_modules/neovim/lib/api/Buffer.js:85:21)
    at p.syncVSCodeToVim (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/neovim/neovim.ts:133:15)
    at runMicrotasks (<anonymous>)
    at process.patch (internal/process/task_queues.js:93:5)
    at p.statusBarText [as run] (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/neovim/neovim.ts:51:88)
    at Object.vimState [as Run] (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/cmd_line/commandLine.ts:79:19)
    at C.j [as exec] (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/actions/commands/commandLine.ts:145:50)
    at C.execCount (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/actions/base.ts:230:42)
    at j.actionToRecord [as runAction] (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/mode/modeHandler.ts:713:47)
    at j.handledAsAction [as handleKeyAsAnAction] (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/mode/modeHandler.ts:662:43)
    at j.text [as handleKeyEvent] (/home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/src/mode/modeHandler.ts:477:11)
    at /home/tyler/.vscode/extensions/vscodevim.vim-1.21.10/extensionBase.ts:370:73

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the stack from src/neovim/neovim.ts, especially syncVSCodeToVim, through the command-line and mode-handler entries shown in the report. Reproduce the error with the reported VSCodeVim version and determine the triggering key and buffer state; done means the scenario no longer raises the nvim_buf_set_lines non-modifiable-buffer error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.