Artem
Artem
> but I have yet to be able to reproduce. You can try this `minimal.lua`. For me, this triggers the bug almost every time (on one of `hl(0, ...` lines)....
It looks like the grid is shown in the middle of redraw. I don't see any invalid state when redraws finish. But I do see 2 intermediate states that could,...
> Wait for me this _doesn't_ reproduce on `master` but does reproduce _after_ `git revert` [cdc9bae](https://github.com/neovim/neovim/commit/cdc9baeaf89eb09f08427a09e3a0f86d56dcc812)... I forgot I had the revert applied when trying to reproduce. Did you somehow...
> It looks like the grid is shown in the middle of redraw. I don't see any invalid state when redraws finish. But I do see 2 intermediate states that...
It looks like something scrolls the screen up one line and then the entire screen is rerendered at the original position after deleting a line, and somehow the intermediate state...
There is no difference in neovim's buffers in `flush_buf()` whether the issue occurs or not. And it doesn't seem to be related to `tui->overflow`.
Still happens on current commit 4a706a70928231643e1a3f3fcf785de7aa930f8b `NVIM v0.12.0-dev-124+g4a706a7092`
Another issue that I assume is related is that `vim.hl.on_yank` highlight randomly disappears before its timeout.
One of the reasons the tests are failing is because highlights are sometimes added when they are outside the current range ([see comment](https://github.com/neovim/neovim/pull/30869#issuecomment-2430570060)). For example, `supports language injections` test fails...
Now initial range is calculated from the number of cells remaining to be drawn. Is using `w_width_inner` correct, or should it be `w_width`? Are they different in multigrid?