Introduction
Introduction Statistics Contact Development Disclaimer Help
tvi: basic z scrolling commands - neatvi - [fork] simple vi-type editor with UT…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit f1cad65ba4925b3ce10822dff8565467662d72b4
parent aa607d3ef71740de17207fa9bc4fcd6a8d2eb556
Author: Ali Gholami Rudi <[email protected]>
Date: Wed, 6 May 2015 16:38:24 +0430
vi: basic z scrolling commands
Diffstat:
M vi.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/vi.c b/vi.c
t@@ -536,6 +536,7 @@ static void vi(void)
lbuf_postindents(xb, &xrow, &xcol);
} else if (!vi_motion(&xrow, &xcol, pre1, 0)) {
int c = vi_read();
+ int z;
if (c <= 0)
continue;
switch (c) {
t@@ -595,7 +596,24 @@ static void vi(void)
redraw = 1;
break;
case 'z':
- xdir = vi_read();
+ z = vi_read();
+ switch (z) {
+ case '\n':
+ xtop = pre1 ? pre1 : xrow;
+ break;
+ case '.':
+ xtop = MAX(0, (pre1 ? pre1 : xrow) - x…
+ break;
+ case '-':
+ xtop = MAX(0, (pre1 ? pre1 : xrow) - x…
+ break;
+ case 'l':
+ case 'r':
+ case 'L':
+ case 'R':
+ xdir = z;
+ break;
+ }
redraw = 1;
break;
default:
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.