Fix exception when Ctrl-clicking the terminal when not over a URL

This commit is contained in:
Stephen Boddy 2015-11-29 23:37:02 +01:00
parent 4d70db1ae2
commit 14fb184df8

View File

@ -921,7 +921,7 @@ class Terminal(Gtk.VBox):
# Ctrl+leftclick on a URL should open it
if event.get_state() & Gdk.ModifierType.CONTROL_MASK == Gdk.ModifierType.CONTROL_MASK:
url = self.check_for_url(event)
if url:
if url[0]:
self.open_url(url, prepare=True)
elif event.button == 2:
# middleclick should paste the clipboard