summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-02-16 22:15:00 +0100
committerBoris Faure <billiob@gmail.com>2015-02-16 22:15:00 +0100
commitf80d9634e3902f2b9fb8e32400e4d549eb1cdb5f (patch)
treec99bc2ff8f5acfd8edb6f8fa55bf580d86601e49 /src
parentfeccb7bcab33772b1f8d69bad598fbd8e61b0ec8 (diff)
fix selection when backscrolling and new content arrives
Thanks to Davide Andreoli for the bug report
Diffstat (limited to 'src')
-rw-r--r--src/bin/termio.c18
1 files 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)
147 if (start_y <= sel_start_y && 147 if (start_y <= sel_start_y &&
148 sel_end_y <= end_y) 148 sel_end_y <= end_y)
149 { 149 {
150 ty->selection.orig.y += direction;
150 ty->selection.start.y += direction; 151 ty->selection.start.y += direction;
151 ty->selection.end.y += direction; 152 ty->selection.end.y += direction;
152 sel_start_y += direction; 153 sel_start_y += direction;
@@ -157,12 +158,17 @@ termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y)
157 _sel_set(sd, EINA_FALSE); 158 _sel_set(sd, EINA_FALSE);
158 } 159 }
159 } 160 }
160 else 161 else if (!((start_y > sel_end_y) ||
161 if (!((start_y > sel_end_y) || 162 (end_y < sel_start_y)))
162 (end_y < sel_start_y))) 163 {
163 { 164 _sel_set(sd, EINA_FALSE);
164 _sel_set(sd, EINA_FALSE); 165 }
165 } 166 else if (sd->scroll > 0)
167 {
168 ty->selection.orig.y += direction;
169 ty->selection.start.y += direction;
170 ty->selection.end.y += direction;
171 }
166 } 172 }
167 if (sd->link.string) 173 if (sd->link.string)
168 { 174 {