diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-22 13:50:54 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-22 13:50:54 -0500 |
commit | b1c548187c65471d1e59bc4099337ae49e2f4536 (patch) | |
tree | f07c59563ccb94b41267b499759edbad19a34917 /buffer.c | |
parent | 1631f38d4dba64577c8f064225599273148ad83d (diff) |
fix automatic horizontal scrolling
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -711,7 +711,7 @@ void buffer_text_dimensions(TextBuffer *buffer, u32 *lines, u32 *columns) { // which line on screen is the longest? for (u32 l = buffer->first_line_on_screen; l <= buffer->last_line_on_screen && l < buffer->nlines; ++l) { Line *line = &buffer->lines[l]; - longest_line = max_u32(longest_line, line->len); + longest_line = max_u32(longest_line, buffer_index_to_column(buffer, l, line->len)); } *columns = longest_line; } |