vscode-neovim: bug: ghost text in editor window when using vim search
Did you check docs and existing issues?
- I have read all the vscode-neovim docs
- I have searched the existing issues of vscode-neovim
- I can reproduce the issue with an empty init.vim/init.lua and no other vscode extensions (when applicable)
Neovim version (nvim -v)
0.9.4
Operating system/version
macOS 14.0
Describe the bug
Quite often when using vim text search via ‘/’, text rendering artefacts appear in the editor when typing the search text, the artefacts are purely visual, the actual content of the edited file is not altered.
Interestingly, when it works as expected, the editor jumps to the first matching occurance, but this ‘jumping to search location’ doesn’t seem to happen when it’s broken, instead those artefacts show up rendered in seemingly random places.
Here’s another example. Strarting to type _sg_wgpu_
first highlighted matches that were already visible in the current editor location, but once the search text was for a match outside the currently visible section, the artefacts appear instead of jumping the function _sg_wgpu_create_buffer
further down in the file.
The single e
after the semicolon seems to be the last character of the search text btw and changes while typing:
If it helps, this is a pretty large source file (> 18kloc).
Here’s another particularly wild example:
The common theme seems to be that at one point, ‘jump to search location’ stops working and then the artefacts appear instead.
Steps To Reproduce
I have not yet found a reliable way to reproduce this unfortunately, neither with other VSCode extensions or not. My neovim config is vanilla. It happens often enough to be annoying though 😉
The bug is already present for a couple of months at least.
Expected Behavior
No text rendering artifacts when searching text.
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 3
- Comments: 24 (1 by maintainers)
Currently using this autocmd
au CmdLineEnter * lua vim.schedule(vim.cmd.nohl)
can alleviate this problem.Okay reprod:
/evsiw
<enter>
/evish
<enter>
to go to the searched line, note that the line skips downwards to 200This works best when
evsiw
’s matching line is at the bottom of the screen. Same withevsih
Video attached from scratch
https://github.com/vscode-neovim/vscode-neovim/assets/21071450/797aa719-c392-4a71-99ae-a6a9397bbe04
I tried a file with 36k lines and couldn’t reproduce the issue. Please try setting
"vscode-neovim.neovimClean": true
and give it another try. If possible, please provide a screen recording.