billiob pushed a commit to branch master.

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

commit f80d9634e3902f2b9fb8e32400e4d549eb1cdb5f
Author: Boris Faure <bill...@gmail.com>
Date:   Mon Feb 16 22:15:00 2015 +0100

    fix selection when backscrolling and new content arrives
    
    Thanks to Davide Andreoli for the bug report
---
 src/bin/termio.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index ad192cf..3bb8bb6 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -147,6 +147,7 @@ termio_scroll(Evas_Object *obj, int direction, int start_y, 
int end_y)
         if (start_y <= sel_start_y &&
             sel_end_y <= end_y)
           {
+             ty->selection.orig.y += direction;
              ty->selection.start.y += direction;
              ty->selection.end.y += direction;
              sel_start_y += direction;
@@ -157,12 +158,17 @@ termio_scroll(Evas_Object *obj, int direction, int 
start_y, int end_y)
                   _sel_set(sd, EINA_FALSE);
                }
           }
-        else
-          if (!((start_y > sel_end_y) ||
-                (end_y < sel_start_y)))
-            {
-               _sel_set(sd, EINA_FALSE);
-            }
+        else if (!((start_y > sel_end_y) ||
+                   (end_y < sel_start_y)))
+          {
+             _sel_set(sd, EINA_FALSE);
+          }
+        else if (sd->scroll > 0)
+          {
+             ty->selection.orig.y += direction;
+             ty->selection.start.y += direction;
+             ty->selection.end.y += direction;
+          }
      }
    if (sd->link.string)
      {

-- 


Reply via email to