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

Treesitter: Injections lose highlights with 'spell' enabled after scrolling to the right #28557

Open
Sam-programs opened this issue Apr 28, 2024 · 1 comment
Labels
bug issues reporting wrong behavior highlight spell spellcheck treesitter
Milestone

Comments

@Sam-programs
Copy link
Contributor

Problem

Injections lose highlights with 'spell' enabled after scrolling to the right.

Steps to reproduce

nvim --clean -u minimal.lua file.lua

-- minimal.lua
vim.schedule(function()
    vim.treesitter.start(0, "lua")
    vim.o.spell = true
    vim.o.columns = 48
    vim.cmd("set nowrap") -- i don't know why vim.o errors
    vim.api.nvim_input(":5<cr>w")
end)
-- file.lua
function some_function_which_is_needed_to_repro() end

vim.cmd("ls")
-- look at "ls" and
-- press_w_here________________________________ a

Expected behavior

Injections keep their highlights after scrolling to the right.

Neovim version (nvim -v)

1 Day old master. 4990701

Vim (not Nvim) behaves the same?

No treesitter in vim.

Operating system/version

Linux 6.8.1-arch1-1

Terminal name/version

wezterm and alacritty

$TERM environment variable

wezterm and alacritty

Installation

build from source

@Sam-programs Sam-programs added the bug issues reporting wrong behavior label Apr 28, 2024
@justinmk justinmk added this to the backlog milestone Apr 29, 2024
@justinmk justinmk added the spell spellcheck label Apr 29, 2024
@tomtomjhj
Copy link
Sponsor Contributor

:Inspect on "ls" shows the entry for @keyword highlight from the injection, which means that treesitter is working correctly. So probably the problem is in redrawing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior highlight spell spellcheck treesitter
Projects
None yet
Development

No branches or pull requests

3 participants