Skip to content

Commit

Permalink
sheet: Fix scrolling up when a buffer refill is required
Browse files Browse the repository at this point in the history
  • Loading branch information
richiejp committed Nov 8, 2024
1 parent 43f73e4 commit 26d8c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/sheet/cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static int zsvsheet_goto_input_raw_row(struct zsvsheet_ui_buffer *uib, size_t in

size_t buffer_rows = zsvsheet_buffer_rows(buffer);
int update_buffer = 0;
if (input_raw_num < input_offset->row // move the buffer up
if (input_raw_num < input_offset->row + input_header_span // move the buffer up
|| input_raw_num + input_header_span + 1 > input_offset->row + buffer_rows // move the buffer down
) {
input_offset->row = input_offset_centered(input_dims, buffer_rows, input_raw_num);
Expand Down

0 comments on commit 26d8c5e

Please sign in to comment.