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-13 21:21:19 -0300 |
commit | b4f516a36a5c15bd9a8722fea13101c0d06aa086 (patch) | |
tree | e725e750383618be061c67989e846fe80505016d | |
parent | df1f62194ea0f06bfe58eba9050fd633b790e0f2 (diff) | |
download | rneovim-b4f516a36a5c15bd9a8722fea13101c0d06aa086.tar.gz rneovim-b4f516a36a5c15bd9a8722fea13101c0d06aa086.tar.bz2 rneovim-b4f516a36a5c15bd9a8722fea13101c0d06aa086.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 c75f9272e3..a1e13cfeb7 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -1822,12 +1822,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 3e5639d23e..77ab948809 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) { |