[gedit] snippets: simplify code in do_get_start_iter()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] snippets: simplify code in do_get_start_iter()
- Date: Sun, 4 Jan 2015 14:59:42 +0000 (UTC)
commit 5169aa5cd4b1d95fb869df7c0b24c886cb33a1aa
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Jan 4 15:56:47 2015 +0100
snippets: simplify code in do_get_start_iter()
plugins/snippets/snippets/completion.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/plugins/snippets/snippets/completion.py b/plugins/snippets/snippets/completion.py
index 81d4418..562b268 100644
--- a/plugins/snippets/snippets/completion.py
+++ b/plugins/snippets/snippets/completion.py
@@ -90,13 +90,10 @@ class Provider(GObject.Object, GtkSource.CompletionProvider):
return None
def do_get_start_iter(self, context, proposal):
- iter = Gtk.TextIter()
if not self.mark or self.mark.get_deleted():
- return (False, iter)
+ return (False, None)
- iter.assign(self.mark.get_buffer().get_iter_at_mark(self.mark))
-
- return (True, iter)
+ return (True, self.mark.get_buffer().get_iter_at_mark(self.mark))
def do_match(self, context):
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]