From 459a8258a8dfdaa8789cf21780212a70a028b06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= Date: Sat, 28 Oct 2017 01:32:52 +0200 Subject: [PATCH] Need to fall back to check_match after hyperlink_check_event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vte_terminal_hyperlink_check_event only matches explicit OSC 8 marked hyperlinks, so we still need to fall back to the existing check_match function for the vast majority of URLs to be clickable. Signed-off-by: Johannes Löthberg --- termite.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/termite.cc b/termite.cc index a61501d..ba1fc30 100644 --- a/termite.cc +++ b/termite.cc @@ -1171,6 +1171,9 @@ gboolean button_press_cb(VteTerminal *vte, GdkEventButton *event, const config_i if (info->clickable_url && event->type == GDK_BUTTON_PRESS) { #if VTE_CHECK_VERSION (0, 49, 1) auto match = make_unique(vte_terminal_hyperlink_check_event(vte, (GdkEvent*)event), g_free); + if (!match) { + match = make_unique(check_match(vte, event), g_free); + } #else auto match = make_unique(check_match(vte, event), g_free); #endif