-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Buffer not redrawn when scrolling after process was suspended #21278
Comments
30 minutes... Maybe some integer overflowed? |
Well, this took a while to bisect, since I had to wait for at least a day to determine if a commit was “good”, but now I finally have the result:
git bisect log
@zeertzjq Could you have a look at this? |
Thanks. Can you check:
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index 4a300384e..d0f4ee774 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -1029,7 +1029,6 @@ win_update_start:
DecorProviders line_providers;
decor_providers_invoke_win(wp, providers, &line_providers, &provider_err);
if (must_redraw != 0) {
- must_redraw = 0;
if (!called_decor_providers) {
called_decor_providers = true;
goto win_update_start;
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index 4a300384e..de6bdda71 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -956,9 +956,6 @@ static void draw_sep_connectors_win(win_T *wp)
/// bot: from bot_start to last row (when scrolled up)
static void win_update(win_T *wp, DecorProviders *providers)
{
- bool called_decor_providers = false;
-win_update_start:
- ;
int top_end = 0; // Below last row of the top area that needs
// updating. 0 when no top area updating.
int mid_start = 999; // first row of the mid area that needs
@@ -1028,13 +1025,6 @@ win_update_start:
DecorProviders line_providers;
decor_providers_invoke_win(wp, providers, &line_providers, &provider_err);
- if (must_redraw != 0) {
- must_redraw = 0;
- if (!called_decor_providers) {
- called_decor_providers = true;
- goto win_update_start;
- }
- }
redraw_win_signcol(wp);
|
Thanks, I’ll test it. Will probably get back to you within the next 1-3 days. |
Oh wait, have you tested this issue on latest HEAD, or only on commits before v0.8.1? |
Sorry I haven't responded yet, I wasn’t feeling well yesterday and the day before, so I didn’t do any programming. Anyhow, based on my testing so far, it seems like removing the first line (1) was sufficient to fix the issue on 0.8.1. Tbh I’m not sure if I ever tested the master branch. I do remember that I tried to revert the commit on master, but it resulted in a merge conflict as the code was quite different, so I gave up. I’m running master right now and will see if I can replicate the issue or not. |
Ok, I can now confirm that the issue also happens on master (v0.9.0-dev-535+gec1738a6e). |
…ovim#21459) Resetting must_redraw caused a strange bug neovim#21278, so don't do it. Remove the goto as well, as it doesn't make much sense after neovim#20665.
Neovim version (nvim -v)
0.8.1
Vim (not Nvim) behaves the same?
no (probably, not tested)
Operating system/version
Arch Linux
Terminal name/version
alacritty, kitty
$TERM environment variable
alacritty
Installation
pacman -S neovim
How to reproduce the issue
After doing this for like 30 minutes, the active split stops redrawing when scrolling. Unfortunately, I'm not able to trigger this bug artificially. It just happens during my regular usage. But it is predictable in so far that it happens every single day, usually within the first hour.
I originally experienced this in alacritty, but I also just got it in kitty, so I don't think the terminal is at fault. I didn't have this problem in nvim 0.7.
Expected behavior
Buffer should be redrawn when scrolling
Actual behavior
Here is a screen recording (this one was recorded in kitty):
nvim-0.8.1-annoyance.mp4
After bringing nvim to the foreground with
fg
, you can see me try to use the mouse wheel. But this doesn't update the buffer, it only jiggles the cursor around (the buffer is still scrolled internally, it's just not drawn on the screen). It doesn't matter whether I use the mouse wheel or any other command likegg
,G
,100gg
etc. I can see the cursor being moved around, but the text isn't scrolled. Only after I temporarily focus the other pane does it start to work again. But after pressing Ctrl+Z and typing fg a second time, the problem is back.This is seriously starting to make nvim unusable to me. The most annoying part is that I often don't notice it right away, start editing, and then get syntax errors in all the wrong places. Only to realize that I edited a completely different line. I'm surprised that I haven't found an existing issue. Am I the only one experiencing this? Is it the fault of a plugin (I don't use that many)? Does anyone have any idea what might be causing this?
The text was updated successfully, but these errors were encountered: