tvi: fix current line offset when scrolling - neatvi - [fork] simple vi-type ed… | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 5c5af360b27ba623e8da5f679f12ee1fa26c6bec | |
parent f1f7d6c1e32ae38ddfb6ff6655dade4e9d82faa8 | |
Author: Ali Gholami Rudi <[email protected]> | |
Date: Thu, 2 Sep 2021 00:57:20 +0430 | |
vi: fix current line offset when scrolling | |
Reported and tested by Kyryl Melekhin <[email protected]>. | |
Diffstat: | |
M vi.c | 2 ++ | |
1 file changed, 2 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/vi.c b/vi.c | |
t@@ -1109,10 +1109,12 @@ static void vi(void) | |
case TK_CTL('e'): | |
if (vi_scrollforward(MAX(1, vi_arg1))) | |
break; | |
+ xoff = vi_col2off(xb, xrow, xcol); | |
break; | |
case TK_CTL('y'): | |
if (vi_scrollbackward(MAX(1, vi_arg1))) | |
break; | |
+ xoff = vi_col2off(xb, xrow, xcol); | |
break; | |
case TK_CTL('u'): | |
if (xrow == 0) |