Fix exception when Ctrl-clicking the terminal when not over a URL
This commit is contained in:
parent
4d70db1ae2
commit
14fb184df8
|
@ -921,7 +921,7 @@ class Terminal(Gtk.VBox):
|
||||||
# Ctrl+leftclick on a URL should open it
|
# Ctrl+leftclick on a URL should open it
|
||||||
if event.get_state() & Gdk.ModifierType.CONTROL_MASK == Gdk.ModifierType.CONTROL_MASK:
|
if event.get_state() & Gdk.ModifierType.CONTROL_MASK == Gdk.ModifierType.CONTROL_MASK:
|
||||||
url = self.check_for_url(event)
|
url = self.check_for_url(event)
|
||||||
if url:
|
if url[0]:
|
||||||
self.open_url(url, prepare=True)
|
self.open_url(url, prepare=True)
|
||||||
elif event.button == 2:
|
elif event.button == 2:
|
||||||
# middleclick should paste the clipboard
|
# middleclick should paste the clipboard
|
||||||
|
|
Loading…
Reference in New Issue