diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-12 08:59:51 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-12 09:47:42 -0300 |
commit | a16cd73eadf473e3f2da104e2620680c4b5dd9d6 (patch) | |
tree | 3d0fd52a5540260af2d6e8c3900da5ed728b6b21 /src/nvim/term.c | |
parent | 418a49f7f1eb5c6a5235cbf34852212899ea4a06 (diff) | |
download | rneovim-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/term.c')
-rw-r--r-- | src/nvim/term.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/term.c b/src/nvim/term.c index 15ced48d91..6459be9703 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -1818,6 +1818,12 @@ void term_write(char_u *s, size_t len) static char_u out_buf[OUT_SIZE + 1]; static int out_pos = 0; /* number of chars in out_buf */ +// Clear the output buffer +void out_buf_clear(void) +{ + out_pos = 0; +} + /* * out_flush(): flush the output buffer */ |