vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 2088e7332912d94258b91e2ad4ac1e6796fe3282
parent ba053e4ed4765ec9c1fbd09408021ea038d9e171
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed, 27 Apr 2016 10:20:21 +0200

text-motions: fix character next motion within a line

Diffstat:
Mtext-motions.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/text-motions.c b/text-motions.c @@ -284,8 +284,7 @@ size_t text_line_char_next(Text *txt, size_t pos) { Iterator it = text_iterator_get(txt, pos); if (!text_iterator_byte_get(&it, &c) || c == '\r' || c == '\n') return pos; - if (!text_iterator_char_next(&it, &c) || c == '\r' || c == '\n') - return pos; + text_iterator_char_next(&it, NULL); return it.pos; }