aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-11 15:58:51 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-08-14 03:07:50 +0200
commit34e5654f2166fea0ae78a6260e8b961be4b07f1d (patch)
tree1ed4e6cad851cb15a5c86330295e8a018309fcbc /src
parentd258ac8ed21b3a202212792688b237d0741f6844 (diff)
downloadrneovim-34e5654f2166fea0ae78a6260e8b961be4b07f1d.tar.gz
rneovim-34e5654f2166fea0ae78a6260e8b961be4b07f1d.tar.bz2
rneovim-34e5654f2166fea0ae78a6260e8b961be4b07f1d.zip
ui: disable 'lazyredraw' during ui_refresh.
Could also try `do_redraw = true` instead of save/restore `p_lz`, but the nice thing about save/restore of `p_lz` is that it is "atomic". The semantics of `do_redraw` are not clear to me. Closes #4884 References #6202 References https://github.com/neovim/neovim/pull/6202#issuecomment-284379503 References #3929 #5692 #6157 References #5866
Diffstat (limited to 'src')
-rw-r--r--src/nvim/screen.c12
-rw-r--r--src/nvim/ui.c5
2 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index f8d519ab36..0c2c4a9bee 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -7440,13 +7440,11 @@ int number_width(win_T *wp)
return n;
}
-/*
- * Set size of the Vim shell.
- * If 'mustset' is TRUE, we must set Rows and Columns, do not get the real
- * window size (this is used for the :win command).
- * If 'mustset' is FALSE, we may try to get the real window size and if
- * it fails use 'width' and 'height'.
- */
+/// Set size of the Vim shell.
+/// If 'mustset' is TRUE, we must set Rows and Columns, do not get the real
+/// window size (this is used for the :win command).
+/// If 'mustset' is FALSE, we may try to get the real window size and if
+/// it fails use 'width' and 'height'.
void screen_resize(int width, int height)
{
static int busy = FALSE;
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index a60c061949..b85a01814d 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -193,7 +193,12 @@ void ui_refresh(void)
}
row = col = 0;
+
+ int save_p_lz = p_lz;
+ p_lz = false; // convince redrawing() to return true ...
screen_resize(width, height);
+ p_lz = save_p_lz;
+
for (UIWidget i = 0; (int)i < UI_WIDGETS; i++) {
ui_set_external(i, ext_widgets[i]);
}