diff options
author | James McCoy <jamessan@jamessan.com> | 2017-02-06 10:23:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-06 10:23:55 -0500 |
commit | 24ade150f9ae0cd2ce137b02530549c66a06b873 (patch) | |
tree | 5940d83ffcbb0e0ce99da948e855d9e04a9a2d02 /src/nvim/screen.c | |
parent | 11efbc80e328d6e92bdb1cdcf6aeac98050c2077 (diff) | |
parent | b77cad183ddcb7d0f312a3cf022238c43932a07b (diff) | |
download | rneovim-24ade150f9ae0cd2ce137b02530549c66a06b873.tar.gz rneovim-24ade150f9ae0cd2ce137b02530549c66a06b873.tar.bz2 rneovim-24ade150f9ae0cd2ce137b02530549c66a06b873.zip |
Merge pull request #6061 from justinmk/vim-ancient-bugs
vim-patch: fix some resize bugs
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index c0db076eff..3823fb2a23 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -487,9 +487,10 @@ void update_single_line(win_T *wp, linenr_T lnum) int j; // Don't do anything if the screen structures are (not yet) valid. - if (!screen_valid(true)) { + if (!screen_valid(true) || updating_screen) { return; } + updating_screen = true; if (lnum >= wp->w_topline && lnum < wp->w_botline && foldedCount(wp, lnum, &win_foldinfo) == 0) { @@ -506,7 +507,8 @@ void update_single_line(win_T *wp, linenr_T lnum) row += wp->w_lines[j].wl_size; } } - need_cursor_line_redraw = FALSE; + need_cursor_line_redraw = false; + updating_screen = false; } @@ -7326,12 +7328,11 @@ void screen_resize(int width, int height) { static int busy = FALSE; - /* - * Avoid recursiveness, can happen when setting the window size causes - * another window-changed signal. - */ - if (busy) + // Avoid recursiveness, can happen when setting the window size causes + // another window-changed signal. + if (updating_screen || busy) { return; + } if (width < 0 || height < 0) /* just checking... */ return; |