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-13 21:21:20 -0300 |
commit | 784bda07040bda16a2e004dcac39a5194d5053b1 (patch) | |
tree | eec4c897eac4e07e76cf4fdc30468e9f71aecabe /src/nvim/term.c | |
parent | f3666e55a44b3f241a98c9509551e2d2bb7bae12 (diff) | |
download | rneovim-784bda07040bda16a2e004dcac39a5194d5053b1.tar.gz rneovim-784bda07040bda16a2e004dcac39a5194d5053b1.tar.bz2 rneovim-784bda07040bda16a2e004dcac39a5194d5053b1.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 a1e13cfeb7..2dc4d68b19 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -1817,6 +1817,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 */ |