billiob pushed a commit to branch master.

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

commit f8edf059d441fca86017e2ec38fc950c61dc7d61
Author: Boris Faure <bill...@gmail.com>
Date:   Sun Nov 17 17:25:09 2013 +0100

    fix scrolling bug. Closes T106
    
    Was fixed with help from great bug report by thomasg.
    
    scroll_rev was ok
---
 src/bin/termptyesc.c | 2 ++
 src/bin/termptyops.c | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index c96aaab..8015b51 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -944,6 +944,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, 
Eina_Unicode *ce)
                        if (arg2 > ty->h) arg2 = ty->h;
                        ty->state.scroll_y1 = arg - 1;
                        ty->state.scroll_y2 = arg2;
+                       if ((arg == 1) && (arg2 == ty->h))
+                          ty->state.scroll_y2 = 0;
                     }
                }
           }
diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index ee44213..428d7d8 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -90,11 +90,11 @@ _termpty_text_scroll(Termpty *ty, Eina_Bool clear)
      }
    else
      {
-       cells = &(ty->screen[end_y * ty->w]);
+       cells = &(TERMPTY_SCREEN(ty, 0, end_y));
        for (y = start_y; y < end_y; y++)
          {
-            cells = &(ty->screen[(y + 1) * ty->w]);
-            cells2 = &(ty->screen[y * ty->w]);
+            cells = &(TERMPTY_SCREEN(ty, 0, (y + 1)));
+            cells2 = &(TERMPTY_SCREEN(ty, 0, y));
             termpty_cell_copy(ty, cells, cells2, ty->w);
          }
        if (clear)

-- 


Reply via email to