[gedit] external tools: Fix link click bug due to GTK API change



commit c70319048b42b898fd6c2f6ee37e98e54cea54be
Author: Adam Dingle <adam medovina org>
Date:   Tue Nov 15 10:54:54 2016 -0800

    external tools: Fix link click bug due to GTK API change
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768793

 plugins/externaltools/tools/outputpanel.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/externaltools/tools/outputpanel.py b/plugins/externaltools/tools/outputpanel.py
index af842d1..d451f29 100644
--- a/plugins/externaltools/tools/outputpanel.py
+++ b/plugins/externaltools/tools/outputpanel.py
@@ -209,7 +209,9 @@ class OutputPanel(UniqueById):
 
         # get the offset within the buffer from the x,y coordinates
         buff_x, buff_y = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT, x, y)
-        iter_at_xy = view.get_iter_at_location(buff_x, buff_y)
+        (over_text, iter_at_xy) = view.get_iter_at_location(buff_x, buff_y)
+        if not over_text:
+            return None
         offset = iter_at_xy.get_offset()
 
         # find the first link that contains the offset


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]