diff options
Diffstat (limited to 'text-motions.c')
| -rw-r--r-- | text-motions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/text-motions.c b/text-motions.c index 21967e5..1430d49 100644 --- a/text-motions.c +++ b/text-motions.c @@ -287,6 +287,8 @@ size_t text_line_up(Text *txt, size_t pos) { size_t text_line_down(Text *txt, size_t pos) { int width = text_line_width_get(txt, pos); size_t next = text_line_next(txt, pos); + if (next == text_size(txt)) + return pos; return text_line_width_set(txt, next, width); } |
