[gtksourceview] snippets: handle more-strict/less-strict/different semantics
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] snippets: handle more-strict/less-strict/different semantics
- Date: Thu, 1 Sep 2022 16:56:47 +0000 (UTC)
commit 474c191a4ef6d309de0812759c365199a34e2139
Author: Christian Hergert <chergert redhat com>
Date: Thu Sep 1 09:56:39 2022 -0700
snippets: handle more-strict/less-strict/different semantics
While very unlikely, it is possible that text changes programatically in
such a way that this could be possible that we need to handle the fully
different form of search text.
.../completion-providers/snippets/gtksourcecompletionsnippets.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/completion-providers/snippets/gtksourcecompletionsnippets.c
b/gtksourceview/completion-providers/snippets/gtksourcecompletionsnippets.c
index 626ea33a..ed5f400e 100644
--- a/gtksourceview/completion-providers/snippets/gtksourcecompletionsnippets.c
+++ b/gtksourceview/completion-providers/snippets/gtksourcecompletionsnippets.c
@@ -368,13 +368,11 @@ gtk_source_completion_snippets_refilter (GtkSourceCompletionProvider *provider,
old_word = g_steal_pointer (&priv->filter_data->word);
if (old_word && g_str_has_prefix (word, old_word))
- {
change = GTK_FILTER_CHANGE_MORE_STRICT;
- }
- else
- {
+ else if (old_word && g_str_has_prefix (old_word, word))
change = GTK_FILTER_CHANGE_LESS_STRICT;
- }
+ else
+ change = GTK_FILTER_CHANGE_DIFFERENT;
if (priv->filter_data->filter_all)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]