Skip to content

Commit

Permalink
Fix #8421
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Mar 9, 2025
1 parent adaa007 commit 2ee03dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kitty/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ prev_char_pos(const Line *self, index_type x, index_type num) {
const CPUCell *ans = self->cpu_cells + x, *limit = self->cpu_cells - 1;
if (ans->is_multicell) ans -= ans->x;
while (num-- && --ans > limit) if (ans->is_multicell) ans -= ans->x;
return ans > limit ? ans - self->cpu_cells : self->xnum;
return ans > limit ? (index_type)(ans - self->cpu_cells) : self->xnum;
}


Expand Down

0 comments on commit 2ee03dd

Please sign in to comment.