mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Ensure charsets are always valid
This commit is contained in:
@@ -163,8 +163,9 @@ uint16_t* translation_table(char which) {
|
||||
return charset_translations[2];
|
||||
case 'V':
|
||||
return charset_translations[3];
|
||||
default:
|
||||
return charset_translations[0];
|
||||
}
|
||||
return charset_translations[0];
|
||||
}
|
||||
|
||||
// UTF-8 decode taken from: http://bjoern.hoehrmann.de/utf-8/decoder/dfa/
|
||||
|
||||
@@ -587,6 +587,9 @@ void screen_restore_cursor(Screen *self) {
|
||||
screen_cursor_position(self, 1, 1);
|
||||
tracker_cursor_changed(self->change_tracker);
|
||||
screen_reset_mode(self, DECOM);
|
||||
self->current_charset = 2;
|
||||
self->g0_charset = translation_table('B');
|
||||
self->g1_charset = translation_table('0');
|
||||
} else {
|
||||
self->g0_charset = sp->g0_charset;
|
||||
self->g1_charset = sp->g1_charset;
|
||||
|
||||
Reference in New Issue
Block a user