aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/termiolink.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-05-27 22:28:06 +0200
committerBoris Faure <billiob@gmail.com>2015-05-27 23:20:08 +0200
commit16c184a9d20c8853652e9de29f28e9c5a336a70b (patch)
tree51d1b0d21897ef2c276b89d591c97eb77c4672d4 /src/bin/termiolink.c
parentfix bell. we want it even if the term is focused (diff)
downloadterminology-16c184a9d20c8853652e9de29f28e9c5a336a70b.tar.gz
fix link detection on links starting at first char of the screen.
Diffstat (limited to 'src/bin/termiolink.c')
-rw-r--r--src/bin/termiolink.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bin/termiolink.c b/src/bin/termiolink.c
index c0151b1..c571eea 100644
--- a/src/bin/termiolink.c
+++ b/src/bin/termiolink.c
@@ -137,13 +137,16 @@ _termio_link_find(Evas_Object *obj, int cx, int cy,
case '{': endmatch = '}'; break;
case '(': endmatch = ')'; break;
}
- coord_forward(&x1, &y1, w, h);
+ if (!(x1 == 0 && y1 == 0))
+ {
+ coord_forward(&x1, &y1, w, h);
- free(s);
- prev_len = len;
- s = termio_selection_get(obj, x1, y1 - sc, x2, y2 - sc,
- &len, EINA_FALSE);
- if (!s) break;
+ free(s);
+ prev_len = len;
+ s = termio_selection_get(obj, x1, y1 - sc, x2, y2 - sc,
+ &len, EINA_FALSE);
+ if (!s) break;
+ }
}
else
{