correctly swap term states. Ref T725

This commit is contained in:
Boris Faure 2015-03-17 17:15:50 +01:00
parent 213417195d
commit 7edeea3503
1 changed files with 11 additions and 2 deletions

View File

@ -1101,15 +1101,24 @@ termpty_screen_swap(Termpty *ty)
{ {
Termcell *tmp_screen; Termcell *tmp_screen;
int tmp_circular_offset; int tmp_circular_offset;
Termstate tmp;
tmp_screen = ty->screen; tmp_screen = ty->screen;
ty->screen = ty->screen2; ty->screen = ty->screen2;
ty->screen2 = tmp_screen; ty->screen2 = tmp_screen;
if (ty->altbuf) if (ty->altbuf)
ty->state = ty->swap; {
tmp = ty->state;
ty->state = ty->swap;
ty->swap = tmp;
}
else else
ty->swap = ty->state; {
tmp = ty->swap;
ty->swap = ty->state;
ty->state = tmp;
}
tmp_circular_offset = ty->circular_offset; tmp_circular_offset = ty->circular_offset;
ty->circular_offset = ty->circular_offset2; ty->circular_offset = ty->circular_offset2;