fix changing state when swapping buffers. Closes T605

For some reason, this is not a real swap. Thanks to gregkh for the great
bug report.
This commit is contained in:
Boris Faure 2013-12-05 22:46:39 +01:00
parent c93c431279
commit 05d091483a
1 changed files with 4 additions and 4 deletions

View File

@ -1013,16 +1013,16 @@ void
termpty_screen_swap(Termpty *ty)
{
Termcell *tmp_screen;
Termstate tmp_state;
int tmp_circular_offset;
tmp_screen = ty->screen;
ty->screen = ty->screen2;
ty->screen2 = tmp_screen;
tmp_state = ty->state;
ty->state = ty->swap;
ty->swap = tmp_state;
if (ty->altbuf)
ty->state = ty->swap;
else
ty->swap = ty->state;
tmp_circular_offset = ty->circular_offset;
ty->circular_offset = ty->circular_offset2;