aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-01-12 08:59:51 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-01-12 09:47:42 -0300
commita16cd73eadf473e3f2da104e2620680c4b5dd9d6 (patch)
tree3d0fd52a5540260af2d6e8c3900da5ed728b6b21 /src/nvim/screen.c
parent418a49f7f1eb5c6a5235cbf34852212899ea4a06 (diff)
downloadrneovim-a16cd73eadf473e3f2da104e2620680c4b5dd9d6.tar.gz
rneovim-a16cd73eadf473e3f2da104e2620680c4b5dd9d6.tar.bz2
rneovim-a16cd73eadf473e3f2da104e2620680c4b5dd9d6.zip
ui: Fix redraw bug caused by race conditions with remote clients
Before sending a resize command to the UIs, flush the current output buffer to ensure no redraw commands for a screen with invalid size are processed.
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index a3b1b4d433..b593d5a687 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -8186,6 +8186,9 @@ void screen_resize(int width, int height, int mustset)
check_shellsize();
if (abstract_ui) {
+ // Clear the output buffer to ensure UIs don't receive redraw command meant
+ // for invalid screen sizes.
+ out_buf_clear();
ui_resize(width, height);
} else {
mch_set_shellsize();