Skip to content

Commit 2ee03dd

Browse files
committed
Fix #8421
1 parent adaa007 commit 2ee03dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kitty/line.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ prev_char_pos(const Line *self, index_type x, index_type num) {
189189
const CPUCell *ans = self->cpu_cells + x, *limit = self->cpu_cells - 1;
190190
if (ans->is_multicell) ans -= ans->x;
191191
while (num-- && --ans > limit) if (ans->is_multicell) ans -= ans->x;
192-
return ans > limit ? ans - self->cpu_cells : self->xnum;
192+
return ans > limit ? (index_type)(ans - self->cpu_cells) : self->xnum;
193193
}
194194

195195

0 commit comments

Comments
 (0)