tex: simply read a number after +/- in ex addresses - neatvi - [fork] simple vi… | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 08cbab4967f94bb675a2d7e4e8ba50a37072e903 | |
parent a162543d7ef56e666d8436be42e9180a4864a4e5 | |
Author: Ali Gholami Rudi <[email protected]> | |
Date: Tue, 19 Jan 2016 21:29:42 +0330 | |
ex: simply read a number after +/- in ex addresses | |
Diffstat: | |
M ex.c | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/ex.c b/ex.c | |
t@@ -237,9 +237,9 @@ static int ex_lineno(char *num) | |
if (num[0] == '$') | |
n = lbuf_len(xb) - 1; | |
if (num[0] == '-') | |
- n = xrow - (num[1] ? ex_lineno(num + 1) : 1); | |
+ n = xrow - (num[1] ? atoi(num + 1) : 1); | |
if (num[0] == '+') | |
- n = xrow + (num[1] ? ex_lineno(num + 1) : 1); | |
+ n = xrow + (num[1] ? atoi(num + 1) : 1); | |
if (num[0] == '\'') | |
lbuf_jump(xb, num[1], &n, NULL); | |
if (num[0] == '/' && num[1]) |