summaryrefslogtreecommitdiff
path: root/gi/overrides/Gtk.py
diff options
context:
space:
mode:
Diffstat (limited to 'gi/overrides/Gtk.py')
-rw-r--r--gi/overrides/Gtk.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 5e086474..9c35b068 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -639,12 +639,18 @@ class TextIter(Gtk.TextIter):
def forward_search(self, string, flags, limit):
success, match_start, match_end = super(TextIter, self).forward_search(string,
flags, limit)
- return (match_start, match_end,)
+ if success:
+ return (match_start, match_end)
+ else:
+ return None
def backward_search(self, string, flags, limit):
success, match_start, match_end = super(TextIter, self).backward_search(string,
flags, limit)
- return (match_start, match_end,)
+ if success:
+ return (match_start, match_end)
+ else:
+ return None
def begins_tag(self, tag=None):
return super(TextIter, self).begins_tag(tag)