[gedit] snippets: use iter.assign to place the completion popup.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] snippets: use iter.assign to place the completion popup.
- Date: Wed, 19 Oct 2011 18:09:16 +0000 (UTC)
commit fd4e815194ecbff4744eb03c411537e2c905d956
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Oct 19 20:08:54 2011 +0200
snippets: use iter.assign to place the completion popup.
plugins/snippets/snippets/completion.py | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/plugins/snippets/snippets/completion.py b/plugins/snippets/snippets/completion.py
index c12513e..4e7378c 100644
--- a/plugins/snippets/snippets/completion.py
+++ b/plugins/snippets/snippets/completion.py
@@ -87,15 +87,13 @@ class Provider(GObject.Object, GtkSource.CompletionProvider):
else:
return None
- def do_get_start_iter(self, context, proposal):
- # FIXME: until we figure out what is wrong that we are getting
- # and invalid iter all the time we can survice with this.
- return (False, None)
-
+ def do_get_start_iter(self, context, proposal, iter):
if not self.mark or self.mark.get_deleted():
- return (False, None)
+ return False
+
+ iter.assign(self.mark.get_buffer().get_iter_at_mark(self.mark))
- return (True, self.mark.get_buffer().get_iter_at_mark(self.mark))
+ return True
def do_match(self, context):
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]