tvi: space and backspace should not change the line - neatvi - [fork] simple vi… | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 3472b9c90eea860d3aff4e9c555fbaab6f4f90bf | |
parent 6831be74582cbec67c8fcba98df286fbf8839015 | |
Author: Ali Gholami Rudi <[email protected]> | |
Date: Sat, 9 May 2015 00:10:39 +0430 | |
vi: space and backspace should not change the line | |
Diffstat: | |
M vi.c | 7 +++---- | |
1 file changed, 3 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/vi.c b/vi.c | |
t@@ -264,7 +264,7 @@ static int vi_motion(int *row, int *col, int pre1, int pre… | |
switch (c) { | |
case ' ': | |
for (i = 0; i < pre; i++) | |
- if (lbuf_next(xb, row, col, 1)) | |
+ if (lbuf_lnnext(xb, row, col, 1)) | |
break; | |
break; | |
case 'f': | |
t@@ -334,9 +334,8 @@ static int vi_motion(int *row, int *col, int pre1, int pre… | |
break; | |
case 127: | |
case TERMCTRL('h'): | |
- *col = ren_cursor(ln, *col); | |
for (i = 0; i < pre; i++) | |
- if (lbuf_next(xb, row, col, -1)) | |
+ if (lbuf_lnnext(xb, row, col, -1)) | |
break; | |
break; | |
default: | |
t@@ -700,7 +699,7 @@ static void vi(void) | |
redraw = 1; | |
break; | |
case 'X': | |
- vi_back('h'); | |
+ vi_back(TERMCTRL('h')); | |
vc_motion('d', pre1); | |
redraw = 1; | |
break; |