tex: allow zero line number in ex command address - neatvi - [fork] simple vi-type editor with UTF-8 support
(HTM) git clone git://src.adamsgaard.dk/neatvi
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 8f0e940847db6c262e9159d00b2301aef0a1bc58
(DIR) parent 077506cd41e5d2770d3314e4b8b4f1ebd402948e
(HTM) Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Date: Mon, 4 Oct 2021 00:22:03 +0900
ex: allow zero line number in ex command address
Diffstat:
M ex.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/ex.c b/ex.c
t@@ -264,6 +264,8 @@ static int ex_region(char *loc, int *beg, int *end)
xrow = *end - 1;
loc++;
}
+ if (*beg < 0 && *end == 0)
+ *beg = 0;
if (*beg < 0 || *beg >= lbuf_len(xb))
return 1;
if (*end < *beg || *end > lbuf_len(xb))