mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-08 23:38:20 +03:00
Fix no cursor position update after drawing small amounts of text
This commit is contained in:
parent
14c6d327fd
commit
6293b37ead
@ -231,6 +231,7 @@ screen_draw_charset(Screen *self, unsigned short *table, uint8_t *buf, unsigned
|
||||
}
|
||||
|
||||
void screen_draw(Screen *self, uint8_t *buf, unsigned int buflen) {
|
||||
unsigned int x = self->cursor->x, y = self->cursor->y;
|
||||
switch(self->current_charset) {
|
||||
case 0:
|
||||
screen_draw_charset(self, self->g0_charset, buf, buflen); break;
|
||||
@ -239,6 +240,7 @@ void screen_draw(Screen *self, uint8_t *buf, unsigned int buflen) {
|
||||
default:
|
||||
screen_draw_utf8(self, buf, buflen); break;
|
||||
}
|
||||
if (x != self->cursor->x || y != self->cursor->y) tracker_cursor_changed(self->change_tracker);
|
||||
}
|
||||
// }}}
|
||||
|
||||
|
@ -51,6 +51,7 @@ class TestScreen(BaseTest):
|
||||
|
||||
pb('12', '12')
|
||||
self.ae(str(s.line(0)), '12 ')
|
||||
self.ae(s.cursor.x, 2)
|
||||
pb('3456', '3456')
|
||||
self.ae(str(s.line(0)), '12345')
|
||||
self.ae(str(s.line(1)), '6 ')
|
||||
|
Loading…
Reference in New Issue
Block a user