diff options
| -rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -88,7 +88,8 @@ TxtLoc start_of_line(Txt *t, TxtLoc l) { } TxtLoc end_of_line(Txt *t, TxtLoc l) { - return next_newline(t, start_of_line(t, l)); + TxtLoc start = start_of_line(t, l); + return txt_byte(t, start) == '\n' ? start : next_newline(t, start); } u32 get_col(Txt *t, TxtLoc l) { |
