forked from enlightenment/terminology
fix CSI DECSET 1049. Should fix T725
This commit is contained in:
parent
65d729ce32
commit
b4ba773e17
|
@ -1101,7 +1101,6 @@ termpty_screen_swap(Termpty *ty)
|
||||||
{
|
{
|
||||||
Termcell *tmp_screen;
|
Termcell *tmp_screen;
|
||||||
int tmp_circular_offset;
|
int tmp_circular_offset;
|
||||||
int tmp_appcursor = ty->state.appcursor;
|
|
||||||
|
|
||||||
tmp_screen = ty->screen;
|
tmp_screen = ty->screen;
|
||||||
ty->screen = ty->screen2;
|
ty->screen = ty->screen2;
|
||||||
|
@ -1116,8 +1115,6 @@ termpty_screen_swap(Termpty *ty)
|
||||||
ty->circular_offset = ty->circular_offset2;
|
ty->circular_offset = ty->circular_offset2;
|
||||||
ty->circular_offset2 = tmp_circular_offset;
|
ty->circular_offset2 = tmp_circular_offset;
|
||||||
|
|
||||||
ty->state.appcursor = tmp_appcursor;
|
|
||||||
|
|
||||||
ty->altbuf = !ty->altbuf;
|
ty->altbuf = !ty->altbuf;
|
||||||
|
|
||||||
if (ty->cb.cancel_sel.func)
|
if (ty->cb.cancel_sel.func)
|
||||||
|
|
|
@ -109,6 +109,23 @@ _handle_cursor_control(Termpty *ty, const Eina_Unicode *cc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_switch_to_alternative_screen(Termpty *ty, int mode)
|
||||||
|
{
|
||||||
|
DBG("switch to alternative screen, mode:%d", mode);
|
||||||
|
if (ty->altbuf)
|
||||||
|
{
|
||||||
|
// if we are looking at alt buf now,
|
||||||
|
// clear main buf before we swap it back
|
||||||
|
// into the screen2 save (so save is
|
||||||
|
// clear)
|
||||||
|
_termpty_clear_all(ty);
|
||||||
|
}
|
||||||
|
// swap screen content now
|
||||||
|
if (mode != ty->altbuf)
|
||||||
|
termpty_screen_swap(ty);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_handle_esc_csi_reset_mode(Termpty *ty, Eina_Unicode cc, Eina_Unicode *b)
|
_handle_esc_csi_reset_mode(Termpty *ty, Eina_Unicode cc, Eina_Unicode *b)
|
||||||
{
|
{
|
||||||
|
@ -290,26 +307,17 @@ _handle_esc_csi_reset_mode(Termpty *ty, Eina_Unicode cc, Eina_Unicode *b)
|
||||||
DBG("Ignored screen mode %i", arg);
|
DBG("Ignored screen mode %i", arg);
|
||||||
break;
|
break;
|
||||||
case 1047:
|
case 1047:
|
||||||
case 1049:
|
|
||||||
case 47:
|
case 47:
|
||||||
DBG("DDD: switch buf");
|
_switch_to_alternative_screen(ty, mode);
|
||||||
if (ty->altbuf)
|
|
||||||
{
|
|
||||||
// if we are looking at alt buf now,
|
|
||||||
// clear main buf before we swap it back
|
|
||||||
// into the screen2 save (so save is
|
|
||||||
// clear)
|
|
||||||
_termpty_clear_all(ty);
|
|
||||||
}
|
|
||||||
// swap screen content now
|
|
||||||
if (mode != ty->altbuf)
|
|
||||||
termpty_screen_swap(ty);
|
|
||||||
break;
|
break;
|
||||||
case 1048:
|
case 1048:
|
||||||
|
case 1049:
|
||||||
if (mode)
|
if (mode)
|
||||||
_termpty_cursor_copy(&(ty->state), &(ty->save));
|
_termpty_cursor_copy(&(ty->state), &(ty->save));
|
||||||
else
|
else
|
||||||
_termpty_cursor_copy(&(ty->save), &(ty->state));
|
_termpty_cursor_copy(&(ty->save), &(ty->state));
|
||||||
|
if (arg == 1049)
|
||||||
|
_switch_to_alternative_screen(ty, mode);
|
||||||
break;
|
break;
|
||||||
case 2004:
|
case 2004:
|
||||||
ty->bracketed_paste = mode;
|
ty->bracketed_paste = mode;
|
||||||
|
|
Loading…
Reference in New Issue