-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Describe the bug
Creating an empty line in insert mode before the first non-empty line causes an error
Error executing vim.schedule lua callback: .../neovim/0.11.4/share/nvim/runtime/
lua/vim/treesitter.lua:384: Invalid position: row and col must be non-negative
stack traceback:
[C]: in function 'assert'
.../neovim/0.11.4/share/nvim/runtime/lua/vim/treesitter.lua:384: in func
tion 'get_node'
.../nvim-treesitter-endwise/lua/nvim-treesitter/endwise.lua:124: in func
tion 'endwise'
.../nvim-treesitter-endwise/lua/nvim-treesitter/endwise.lua:216: in func
tion ''
vim/_editor.lua: in function <vim/_editor.lua:0>
To Reproduce
- Open an empty Ruby or Lua file
- In insert mode, press enter -> error
- Create a non-empty line
- In insert mode, navigate to the start of the non-empty line and press enter -> error
- In insert mode, navigate to any empty line before the first non-empty line and press enter -> error
Expected behavior
No error on creating a new empty line
Screengrab
Screen.Recording.2025-09-13.at.16.01.56.mov
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels