-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[RFC] screen.c: add update_window_hl to special redrawing entrypoints #8789
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
Conversation
@bfredl It might not be easy to reproduce, but can be using the following minimal set runtimepath+=$PWD
let g:neomake_open_list = 2
call neomake#quickfix#enable()
new
set filetype=sh
call setline(1, ['a="'])
Neomake sh What triggers it appears to be placing signs in the custom quickfix that gets opened then. |
For me it's also difficult to reproduce. I'm reasonably sure it's caused by vim-signify, and it only seems to happen when I open nvim with two split files on the command-line:
Both files must have changed lines (according to vim-signify), otherwise the bug doesn't trigger. I don't know nearly enough about the drawing code, but your comment about just using the standard path sounds good. It's worth a shot. Then again, we've encountered Chesterton's fence a lot in old pieces of Vim :). |
If were to entertain a guess, the special codepath might be because signs were introduced togheter with netbeans protocol, and thus the first UI feature expected to be redrawn mosty due to async events (i e something other that user input). But now we expect that async events can change mostly everything (window layout, buffer contents etc), so there is no strong argument to still special case signs. |
Reduced to the following script
|
The following (run as a script) used to cause a crash due to :sign using a special redraw (not updating nvim's specific highlight data structures) without proper redraw first, as split just flags for redraw later. set cursorline sign define piet text=>> texthl=Search split sign place 3 line=2 name=piet buffer=1
Kept the hotfix for now with a test, a proper refactor can be separate PR. |
Thanks for fixing it @bfredl! Looking forward to the refactor. |
Might fix 989b585, though I haven't been able to reproduce it. Perhaps the neomake situation can be faked with a short script, I'll look into it.
NB: I do not know what makes debug signs so special snowflakey that they need their own entry point into the redraw subsystem (there are already ways to mark a buffer line range as visually changed even if its text doesn't change, bufhl uses it), perhaps we can just delete this code and use the standard path.