aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text-motions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/text-motions.c b/text-motions.c
index ae8944f..f590f33 100644
--- a/text-motions.c
+++ b/text-motions.c
@@ -162,8 +162,8 @@ size_t text_line_finish(Text *txt, size_t pos) {
size_t text_line_end(Text *txt, size_t pos) {
char c;
Iterator it = text_iterator_get(txt, pos);
- while (text_iterator_byte_get(&it, &c) && c != '\r' && c != '\n')
- text_iterator_byte_next(&it, NULL);
+ if (text_iterator_char_get(&it, &c) && c != '\n')
+ while (text_iterator_char_next(&it, &c) && c != '\n');
return it.pos;
}