aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-04-27 10:20:21 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-04-27 10:41:53 +0200
commitbfc2e5d1d1c98f97eeb089f844fdb6170c654f23 (patch)
treed241764ac121cef09704491e0c48ec5d0cb9f2bf
parent0319b359acae515550a3ff68bf62aa2e476015fe (diff)
downloadvis-bfc2e5d1d1c98f97eeb089f844fdb6170c654f23.tar.gz
vis-bfc2e5d1d1c98f97eeb089f844fdb6170c654f23.tar.xz
text-motions: fix character next motion within a line
-rw-r--r--text-motions.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/text-motions.c b/text-motions.c
index e48dd9a..1bf6611 100644
--- 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;
}