Skip to content

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented Jul 26, 2018

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.

@blueyed
Copy link
Contributor

blueyed commented Jul 26, 2018

@bfredl
It fixes it for me, thanks!

It might not be easy to reproduce, but can be using the following minimal vimrc in Neomake's checkout:

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.

@aktau
Copy link
Contributor

aktau commented Jul 27, 2018

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:

nvim -O <file1> <file2>

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 :).

@bfredl
Copy link
Member Author

bfredl commented Jul 27, 2018

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.

@aktau
Copy link
Contributor

aktau commented Jul 27, 2018

@bfredl your guess is as good as anyone's (except for @brammool I suppose).

In any case, before a release we can experiment a bit (while adding tests when finding regressions). Your earlier comment about using value types is also... valuable ;).

@bfredl
Copy link
Member Author

bfredl commented Jul 27, 2018

Reduced to the following script

set cursorline
sign define piet text=>> texthl=Search
split
:exe ":sign place 3 line=2 name=piet file=" . expand("%:p")

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
@bfredl bfredl changed the title [WIP] screen.c: add update_window_hl to special redrawing entrypoints [RFC] screen.c: add update_window_hl to special redrawing entrypoints Jul 27, 2018
@bfredl
Copy link
Member Author

bfredl commented Jul 27, 2018

Kept the hotfix for now with a test, a proper refactor can be separate PR.

@marvim marvim added RFC and removed WIP labels Jul 27, 2018
@bfredl bfredl mentioned this pull request Jul 27, 2018
@bfredl bfredl merged commit 9abe0bd into neovim:master Jul 27, 2018
@justinmk justinmk removed the RFC label Jul 27, 2018
@aktau
Copy link
Contributor

aktau commented Jul 30, 2018

Thanks for fixing it @bfredl! Looking forward to the refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants