Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurs when opening the command-line window #507

Open
archilkarchava opened this issue Oct 18, 2024 · 2 comments
Open

An error occurs when opening the command-line window #507

archilkarchava opened this issue Oct 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@archilkarchava
Copy link

Description

To reproduce try to open the command-line window, e.g. by pressing q: in normal mode when the context is shown.

Neovim version

0.10.2

Expected behavior

No error should be shown.

Actual behavior

The following error is shown when opening the command-line window:
Error executing vim.schedule lua callback: ...vim-treesitter-context/lua/treesitter-context/render.lua:302: E11: Invalid in command-line window; executes,
CTRL-C quits
stack traceback:
[C]: in function 'nvim_buf_delete'
...vim-treesitter-context/lua/treesitter-context/render.lua:302: in function <...vim-treesitter-context/lua/treesitter-context/render.lua:296>

Minimal config

local plugins = {
ts = 'https://github.com/nvim-treesitter/nvim-treesitter',
ts_context = 'https://github.com/nvim-treesitter/nvim-treesitter-context',
}

for name, url in pairs(plugins) do
local install_path = '/tmp/nvim/site/'..name
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.o.runtimepath = install_path..','..vim.o.runtimepath
end

Steps to reproduce

  1. nvim --clean -u minimal.lua treesitter-context.lua (you can replace the treesitter-context.lua with any other large enough file where the context will be shown).
  2. Move the cursor down until the context appears.
  3. Press q: in normal mode to enter the command-line window mode.
Screen.Recording.2024-10-18.at.22.21.18.mp4
@archilkarchava archilkarchava added the bug Something isn't working label Oct 18, 2024
@lewis6991
Copy link
Member

@apollo1321 could this be from one of your recent changes?

@archilkarchava
Copy link
Author

archilkarchava commented Oct 18, 2024

@lewis6991, @apollo1321, forgot to mention, the issue appeared in 3de5708.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants