Also save DECTCEM when saving cursor
This commit is contained in:
parent
5b9aadd135
commit
4ccb05d3d3
@ -256,9 +256,7 @@ typedef struct {
|
|||||||
uint32_t utf8_state, *g0_charset, *g1_charset, *g_charset;
|
uint32_t utf8_state, *g0_charset, *g1_charset, *g_charset;
|
||||||
bool use_latin1;
|
bool use_latin1;
|
||||||
Cursor cursor;
|
Cursor cursor;
|
||||||
bool mDECOM;
|
bool mDECOM, mDECAWM, mDECSCNM, mDECTCEM;
|
||||||
bool mDECAWM;
|
|
||||||
bool mDECSCNM;
|
|
||||||
|
|
||||||
} Savepoint;
|
} Savepoint;
|
||||||
|
|
||||||
|
|||||||
@ -348,7 +348,8 @@ END_ALLOW_CASE_RANGE
|
|||||||
// Modes {{{
|
// Modes {{{
|
||||||
|
|
||||||
|
|
||||||
void screen_toggle_screen_buffer(Screen *self) {
|
void
|
||||||
|
screen_toggle_screen_buffer(Screen *self) {
|
||||||
screen_save_cursor(self);
|
screen_save_cursor(self);
|
||||||
if (self->linebuf == self->main_linebuf) {
|
if (self->linebuf == self->main_linebuf) {
|
||||||
linebuf_clear(self->alt_linebuf, ' ');
|
linebuf_clear(self->alt_linebuf, ' ');
|
||||||
@ -637,6 +638,7 @@ screen_save_cursor(Screen *self) {
|
|||||||
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->mDECSCNM = self->modes.mDECSCNM;
|
||||||
|
sp->mDECTCEM = self->modes.mDECTCEM;
|
||||||
COPY_CHARSETS(self, sp);
|
COPY_CHARSETS(self, sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -650,11 +652,13 @@ screen_restore_cursor(Screen *self) {
|
|||||||
screen_reset_mode(self, DECOM);
|
screen_reset_mode(self, DECOM);
|
||||||
RESET_CHARSETS;
|
RESET_CHARSETS;
|
||||||
screen_reset_mode(self, DECSCNM);
|
screen_reset_mode(self, DECSCNM);
|
||||||
|
screen_set_mode(self, DECTCEM);
|
||||||
} else {
|
} else {
|
||||||
COPY_CHARSETS(sp, self);
|
COPY_CHARSETS(sp, self);
|
||||||
set_mode_from_const(self, DECOM, sp->mDECOM);
|
set_mode_from_const(self, DECOM, sp->mDECOM);
|
||||||
set_mode_from_const(self, DECAWM, sp->mDECAWM);
|
set_mode_from_const(self, DECAWM, sp->mDECAWM);
|
||||||
set_mode_from_const(self, DECSCNM, sp->mDECSCNM);
|
set_mode_from_const(self, DECSCNM, sp->mDECSCNM);
|
||||||
|
set_mode_from_const(self, DECTCEM, sp->mDECTCEM);
|
||||||
cursor_copy_to(&(sp->cursor), self->cursor);
|
cursor_copy_to(&(sp->cursor), self->cursor);
|
||||||
screen_ensure_bounds(self, false);
|
screen_ensure_bounds(self, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user