Skip to content

Commit

Permalink
Fix #4739
Browse files Browse the repository at this point in the history
I hope, since I cannot reproduce.
  • Loading branch information
kovidgoyal committed Feb 25, 2022
1 parent da10eac commit 2d7cb25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kitty/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1537,8 +1537,9 @@ screen_fake_move_cursor_to_position(Screen *self, index_type start_x, index_type
else { start = &b; end = &a; key = GLFW_FKEY_RIGHT; }
unsigned int count = 0;

for (unsigned y = start->y, x = start->x; y <= end->y; y++) {
for (unsigned y = start->y, x = start->x; y <= end->y && y < self->lines; y++) {
unsigned x_limit = y == end->y ? end->x : self->columns;
x_limit = MIN(x_limit, self->columns);
bool found_non_empty_cell = false;
while (x < x_limit) {
unsigned int w = linebuf_char_width_at(self->linebuf, x, y);
Expand Down

0 comments on commit 2d7cb25

Please sign in to comment.