return Efallthrough;
}
/* NOTE must find new location before view changes. */
- call("Move-CursorXY", ci->focus, 0, m, NULL, 0, NULL, NULL, ci->x, ci->y);
+ call("Move-CursorXY", ci->focus, 0, m, "prepare",
+ 0, NULL, NULL, ci->x, ci->y);
clear_selection(ci->focus, pt, mk, 0);
call("Move-to", ci->focus, 0, m);
if str1 == "render:url-end":
leng = -1
comm2("attr:callback", focus, leng, mark,
- "fg:cyan-60,underline,action-activate:Activate:url,url-tag="+tg, 120)
+ "fg:cyan-60,underline,action-prepare:Activate:url,"
+ "action-activate:Activate:url,url-tag="+tg, 120)
return 1
- def handle_click(self, key, focus, mark, str1, **a):
+ def handle_click(self, key, focus, mark, str1, str2, **a):
"handle:Activate:url"
a = str1.split(',')
tag=""
url = focus["url:" + tag]
if url:
focus.call("Message", "Url: <%s>" % url)
- if self.displayed_tag == tag:
+ if self.displayed_tag == tag and str2 != "prepare":
focus.call("Window:external-viewer", url)
self.displayed_tag = tag
else:
;
}
call(tag, focus, 0, m2, xyattr,
- 0, ci->mark, NULL,
+ 0, ci->mark, action,
cih.x, cih.y);
}
m = m2;
tag = get_action_tag(ci->str, attr);
if (!tag)
return Efallthrough;
- call(tag, focus, 0, m, attr);
+ call(tag, focus, 0, m, attr, 0, NULL, ci->str);
return 1;
}