billiob pushed a commit to branch master.

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

commit 26f2607095bcde26c5eaf9d7addac6c6eef8e921
Author: Boris Faure <[email protected]>
Date:   Fri Feb 6 21:48:50 2015 +0100

    select links as words. Closes T2038
---
 src/bin/termio.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index 21d2f22..75f7cce 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2674,6 +2674,17 @@ _sel_word(Termio *sd, int cx, int cy)
    sd->pty->selection.end.y = cy;
    x = cx;
    y = cy;
+
+   if (sd->link.string &&
+       (sd->link.x1 <= cx) && (cx <= sd->link.x2) &&
+       (sd->link.y1 <= cy) && (cy <= sd->link.y2))
+     {
+        sd->pty->selection.start.x = sd->link.x1;
+        sd->pty->selection.start.y = sd->link.y1;
+        sd->pty->selection.end.x = sd->link.x2;
+        sd->pty->selection.end.y = sd->link.y2;
+        goto end;
+     }
    cells = termpty_cellrow_get(sd->pty, y, &w);
    if (!cells) goto end;
    if (x >= w) x = w - 1;

-- 


Reply via email to