diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-10 02:37:22 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-12 09:47:41 -0300 |
commit | e1da130ca9bb132335e4255421fded3e80ca4fad (patch) | |
tree | 8c20b2f2e4567919a2ced312f3216dbab51f9989 | |
parent | e3b2907f2f4dceece300e1f9b61cfd8060ff4dce (diff) | |
download | rneovim-e1da130ca9bb132335e4255421fded3e80ca4fad.tar.gz rneovim-e1da130ca9bb132335e4255421fded3e80ca4fad.tar.bz2 rneovim-e1da130ca9bb132335e4255421fded3e80ca4fad.zip |
ui: Fix out_flush/ui_write behavior to always flush for abstract_ui
-rw-r--r-- | src/nvim/term.c | 9 | ||||
-rw-r--r-- | src/nvim/ui.c | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/term.c b/src/nvim/term.c index f5ca10e6d9..15ced48d91 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -1823,12 +1823,9 @@ static int out_pos = 0; /* number of chars in out_buf */ */ void out_flush(void) { - if (out_pos != 0) { - /* set out_pos to 0 before ui_write, to avoid recursiveness */ - int len = out_pos; - out_pos = 0; - ui_write(out_buf, len); - } + int len = out_pos; + out_pos = 0; + ui_write(out_buf, len); } /* diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 5bd4382483..5b28cf2243 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -95,6 +95,10 @@ void ui_write(uint8_t *s, int len) return; } + if (!len) { + return; + } + char_u *tofree = NULL; if (output_conv.vc_type != CONV_NONE) { |