diff options
author | Boris Faure <billiob@gmail.com> | 2015-02-06 21:48:50 +0100 |
---|---|---|
committer | Boris Faure <billiob@gmail.com> | 2015-02-06 22:10:10 +0100 |
commit | 26f2607095bcde26c5eaf9d7addac6c6eef8e921 (patch) | |
tree | d477f4ddd9148a55869e869f382d178df7193148 /src | |
parent | 5a9dcf1ed3d0f5c81d1f0d164e1cd2865ea4ab2a (diff) |
select links as words. Closes T2038
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/termio.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) | |||
2674 | sd->pty->selection.end.y = cy; | 2674 | sd->pty->selection.end.y = cy; |
2675 | x = cx; | 2675 | x = cx; |
2676 | y = cy; | 2676 | y = cy; |
2677 | |||
2678 | if (sd->link.string && | ||
2679 | (sd->link.x1 <= cx) && (cx <= sd->link.x2) && | ||
2680 | (sd->link.y1 <= cy) && (cy <= sd->link.y2)) | ||
2681 | { | ||
2682 | sd->pty->selection.start.x = sd->link.x1; | ||
2683 | sd->pty->selection.start.y = sd->link.y1; | ||
2684 | sd->pty->selection.end.x = sd->link.x2; | ||
2685 | sd->pty->selection.end.y = sd->link.y2; | ||
2686 | goto end; | ||
2687 | } | ||
2677 | cells = termpty_cellrow_get(sd->pty, y, &w); | 2688 | cells = termpty_cellrow_get(sd->pty, y, &w); |
2678 | if (!cells) goto end; | 2689 | if (!cells) goto end; |
2679 | if (x >= w) x = w - 1; | 2690 | if (x >= w) x = w - 1; |