tvi: redraw the entire screen if current line changes - neatvi - [fork] simple vi-type editor with UTF-8 support
(HTM) git clone git://src.adamsgaard.dk/neatvi
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit e8b863838feddbd51f6aac60c849eee0783d8d10
(DIR) parent 22b03572dac915a7d752a9d5b182355d2e46cb88
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Mon, 13 Jan 2020 17:35:02 +0330
vi: redraw the entire screen if current line changes
Reported by Aaron G <mastaag@gmail.com>.
Diffstat:
M vi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/vi.c b/vi.c
t@@ -1056,6 +1056,7 @@ static void vi(void)
int noff = ren_noeol(lbuf_get(xb, xrow), xoff);
int otop = xtop;
int oleft = xleft;
+ int orow = xrow;
int mv, n;
term_cmd(&n);
vi_arg2 = 0;
t@@ -1326,7 +1327,7 @@ static void vi(void)
xleft = xcol < xcols ? 0 : xcol - xcols / 2;
vi_wait();
if (mod || xleft != oleft)
- vi_drawagain(xcol, mod == 2 && xleft == oleft);
+ vi_drawagain(xcol, mod == 2 && xleft == oleft && xrow == orow);
else if (xtop != otop)
vi_drawupdate(xcol, otop);
if (vi_msg[0])