diff --git a/kitty/charsets.c b/kitty/charsets.c index eca4419f3..eab334a73 100644 --- a/kitty/charsets.c +++ b/kitty/charsets.c @@ -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/ diff --git a/kitty/screen.c b/kitty/screen.c index d654a8391..c36f2ad34 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -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;