Open hoschi opened 6 years ago
Thanks for reporting this, @hoschi! I've seen this too - characters will be seemingly randomly highlighted.
If anyone stumbles upon a consistent repro for it, that would be helpful! I need to narrow down whether it is a problem where the syntax highlight store gets out of sync (highlighting the wrong lines), or if it has to do with how we synchronize the highlights back to neovim via nvim_buf_add_highlights
.
I do think there may be cases where insert mode causes a problem, especially if the insert operations spans multiple lines (ie, pressing enter while in insert mode).
Marked it as 'blocker' because this should be fixed before we enable-by-defaujlt.
I found one repro (which may or may not be a separate issue):
I believe comments have other problems too, but need also find repos for that one. Still, good catch 👍
@bryphe have by chance a highlight for the cursor column active? Thought that could probably make problem in other lines than the current one. I have a vim plugin enabled for that.
Things are much improved since #1272 was merged although another scenario I've noticed can mess up the highlighting is having the contents of a buffer changed for example when I run prettier
on save using ale.vim
the contents of the buffer are essentially replaced.
I've noticed that this causes highlighiting to go out of wack, another example is changing branch if the file itself is very different from one branch to another this also really messes with highlighting.
This feels much better now, I'm not sure if any updates for this were added when we brought prettier into Oni?
Still happens when you change the file from outside
I got them not to rarely but can't identify a root case, yet: