From 68151636065f9f23ea40dca826964ffafa29c283 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 12 Dec 2014 16:27:54 -0300 Subject: ui: Add mising T_CSV code to abstract_ui termcap This code is required for screen.c to set a vertical scroll region, which is a great optimization when scrolling vertically split windows. --- src/nvim/term.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/term.c') diff --git a/src/nvim/term.c b/src/nvim/term.c index dfc42632c6..f5ca10e6d9 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -170,6 +170,7 @@ static struct builtin_term builtin_termcaps[] = {(int)KS_DL, "\033|d"}, {(int)KS_CDL, "\033|%p1%dD"}, {(int)KS_CS, "\033|%p1%d;%p2%dR"}, + {(int)KS_CSV, "\033|%p1%d;%p2%dV"}, {(int)KS_CL, "\033|C"}, // attributes switched on with 'h', off with * 'H' {(int)KS_ME, "\033|31H"}, // HL_ALL -- cgit From e1da130ca9bb132335e4255421fded3e80ca4fad Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sat, 10 Jan 2015 02:37:22 -0300 Subject: ui: Fix out_flush/ui_write behavior to always flush for abstract_ui --- src/nvim/term.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/nvim/term.c') 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); } /* -- cgit From a16cd73eadf473e3f2da104e2620680c4b5dd9d6 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Mon, 12 Jan 2015 08:59:51 -0300 Subject: 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. --- src/nvim/term.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/term.c') 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 */ -- cgit