billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=7edeea350332427b1045e79a457cddb2e6f812bc

commit 7edeea350332427b1045e79a457cddb2e6f812bc
Author: Boris Faure <bill...@gmail.com>
Date:   Tue Mar 17 17:15:50 2015 +0100

    correctly swap term states. Ref T725
---
 src/bin/termpty.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index f4271a9..ad3ab81 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -1101,15 +1101,24 @@ termpty_screen_swap(Termpty *ty)
 {
    Termcell *tmp_screen;
    int tmp_circular_offset;
+   Termstate tmp;
 
    tmp_screen = ty->screen;
    ty->screen = ty->screen2;
    ty->screen2 = tmp_screen;
 
    if (ty->altbuf)
-      ty->state = ty->swap;
+     {
+        tmp = ty->state;
+        ty->state = ty->swap;
+        ty->swap = tmp;
+     }
    else
-      ty->swap = ty->state;
+     {
+        tmp = ty->swap;
+        ty->swap = ty->state;
+        ty->state = tmp;
+     }
 
    tmp_circular_offset = ty->circular_offset;
    ty->circular_offset = ty->circular_offset2;

-- 


Reply via email to