Introduction
Introduction Statistics Contact Development Disclaimer Help
tvi: do not reset xrow in vi() - neatvi - [fork] simple vi-type editor with UTF…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit 2460d9a6808b950d1e83db81c2e9e983dd608b79
parent 5da6bb0629bff3c69de6f99671fde70a29ba0ca9
Author: Ali Gholami Rudi <[email protected]>
Date: Sun, 28 Jun 2015 23:47:49 +0430
vi: do not reset xrow in vi()
Reported by Christian Neukirchen <[email protected]>.
Diffstat:
M ex.c | 2 +-
M vi.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/ex.c b/ex.c
t@@ -339,7 +339,7 @@ static int ec_edit(char *ec)
ex_path(), lbuf_len(xb));
ex_show(msg);
}
- xrow = MAX(0, MIN(xrow, lbuf_len(xb) - 1));
+ xrow = xvis ? 0 : MAX(0, MIN(xrow, lbuf_len(xb) - 1));
lbuf_saved(xb, path[0] != '\0');
return 0;
}
diff --git a/vi.c b/vi.c
t@@ -1000,8 +1000,7 @@ static void vi(void)
int mark;
char *ln;
char *kmap = NULL;
- xtop = 0;
- xrow = 0;
+ xtop = xrow;
xoff = 0;
xcol = vi_off2col(xb, xrow, xoff);
vi_draw(xcol);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.