[gedit] snippets: adapt code for gtk_source_completion_context_get_iter()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] snippets: adapt code for gtk_source_completion_context_get_iter()
- Date: Sat, 3 Jan 2015 21:25:34 +0000 (UTC)
commit 5540838a7dff1d025b995c251f51c1c29ce0c0ce
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Jan 3 19:40:01 2015 +0100
snippets: adapt code for gtk_source_completion_context_get_iter()
A boolean return value has been added.
plugins/snippets/snippets/completion.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/snippets/snippets/completion.py b/plugins/snippets/snippets/completion.py
index 4427f21..774956a 100644
--- a/plugins/snippets/snippets/completion.py
+++ b/plugins/snippets/snippets/completion.py
@@ -74,7 +74,9 @@ class Provider(GObject.Object, GtkSource.CompletionProvider):
self.mark.get_buffer().move_mark(self.mark, it)
def get_word(self, context):
- it = context.get_iter()
+ (valid_context, it) = context.get_iter()
+ if not valid_context:
+ return None
if it.starts_word() or it.starts_line() or not it.ends_word():
return None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]