[gnome-builder] vala: discard previous results when after a period
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vala: discard previous results when after a period
- Date: Fri, 2 Dec 2016 01:00:47 +0000 (UTC)
commit 297fc72c4a479346ea737c90790cd6df0c1435ee
Author: Christian Hergert <chergert redhat com>
Date: Thu Dec 1 17:00:20 2016 -0800
vala: discard previous results when after a period
.../vala-pack/ide-vala-completion-provider.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/plugins/vala-pack/ide-vala-completion-provider.vala
b/plugins/vala-pack/ide-vala-completion-provider.vala
index 64cc2ef..234cb33 100644
--- a/plugins/vala-pack/ide-vala-completion-provider.vala
+++ b/plugins/vala-pack/ide-vala-completion-provider.vala
@@ -48,7 +48,14 @@ namespace Ide
var line = begin.get_slice (iter);
if (this.results != null) {
- if ((this.line == iter.get_line ()) && this.results.replay (this.query)) {
+ // If we are right after a . then we cannot reuse our
+ // previous results since they will be for a different
+ // object type, also, ensure that the word has the same
+ // prefix as our initial query or we must regenerate
+ // our results.
+ if (!line.has_suffix (".") &&
+ this.line == iter.get_line () &&
+ this.results.replay (this.query)) {
this.results.present (this, context);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]