aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/termiolink.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-10-09 14:50:01 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-10-09 14:50:01 +0000
commit5bfed09e13d7c966ebd7ec1ba3ea60642f7f6522 (patch)
tree4bfc1283863ad49b2eb0e14e1420fd54ab8f3271 /src/bin/termiolink.c
parentproperly handle youtube url (diff)
downloadterminology-5bfed09e13d7c966ebd7ec1ba3ea60642f7f6522.tar.gz
just highlight emails with domains containing a period.
While a domain "localhost" is valid, it's very annoying as most PS1 prompts are in the form 'user@hostname' and terminology will highlight them. To avoid so just create links for user@hostname.something SVN revision: 77647
Diffstat (limited to 'src/bin/termiolink.c')
-rw-r--r--src/bin/termiolink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/termiolink.c b/src/bin/termiolink.c
index 6d84f19..86a6628 100644
--- a/src/bin/termiolink.c
+++ b/src/bin/termiolink.c
@@ -160,7 +160,9 @@ _termio_link_find(Evas_Object *obj, int cx, int cy, int *x1r, int *y1r, int *x2r
}
if ((!isspace(s[0])) && (len > 1))
{
- if ((strchr(s, '@')) ||
+ const char *at = strchr(s, '@');
+
+ if ((at && (strchr(at + 1, '.'))) ||
(!strncasecmp(s, "http://", 7))||
(!strncasecmp(s, "https://", 8)) ||
(!strncasecmp(s, "ftp://", 6)) ||