mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Also save/restore DESCNM state
This commit is contained in:
@@ -239,6 +239,7 @@ typedef struct {
|
|||||||
Cursor cursor;
|
Cursor cursor;
|
||||||
bool mDECOM;
|
bool mDECOM;
|
||||||
bool mDECAWM;
|
bool mDECAWM;
|
||||||
|
bool mDECSCNM;
|
||||||
|
|
||||||
} Savepoint;
|
} Savepoint;
|
||||||
|
|
||||||
|
|||||||
@@ -540,6 +540,7 @@ screen_save_cursor(Screen *self) {
|
|||||||
cursor_copy_to(self->cursor, &(sp->cursor));
|
cursor_copy_to(self->cursor, &(sp->cursor));
|
||||||
sp->mDECOM = self->modes.mDECOM;
|
sp->mDECOM = self->modes.mDECOM;
|
||||||
sp->mDECAWM = self->modes.mDECAWM;
|
sp->mDECAWM = self->modes.mDECAWM;
|
||||||
|
sp->mDECSCNM = self->modes.mDECSCNM;
|
||||||
sp->utf8_state = self->utf8_state;
|
sp->utf8_state = self->utf8_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -551,10 +552,12 @@ screen_restore_cursor(Screen *self) {
|
|||||||
screen_cursor_position(self, 1, 1);
|
screen_cursor_position(self, 1, 1);
|
||||||
tracker_cursor_changed(self->change_tracker);
|
tracker_cursor_changed(self->change_tracker);
|
||||||
screen_reset_mode(self, DECOM);
|
screen_reset_mode(self, DECOM);
|
||||||
|
screen_reset_mode(self, DECSCNM);
|
||||||
} else {
|
} else {
|
||||||
self->utf8_state = sp->utf8_state;
|
self->utf8_state = sp->utf8_state;
|
||||||
if (sp->mDECOM) screen_set_mode(self, DECOM);
|
set_mode_from_const(self, DECOM, sp->mDECOM);
|
||||||
if (sp->mDECAWM) screen_set_mode(self, DECAWM);
|
set_mode_from_const(self, DECAWM, sp->mDECAWM);
|
||||||
|
set_mode_from_const(self, DECSCNM, sp->mDECSCNM);
|
||||||
cursor_copy_to(&(sp->cursor), self->cursor);
|
cursor_copy_to(&(sp->cursor), self->cursor);
|
||||||
screen_ensure_bounds(self, false);
|
screen_ensure_bounds(self, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user