Skip to content

Commit

Permalink
text: improve text_line_down on the last line of the file
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Sep 17, 2020
1 parent 31d6cee commit 5d8f65f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions text-motions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5d8f65f

Please sign in to comment.