commit 08cbab4967f94bb675a2d7e4e8ba50a37072e903
parent a162543d7ef56e666d8436be42e9180a4864a4e5
Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Tue, 19 Jan 2016 21:29:42 +0330
ex: simply read a number after +/- in ex addresses
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ex.c b/ex.c
@@ -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])