[gnome-builder] libide/search: handle backspace more gracefully
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/search: handle backspace more gracefully
- Date: Tue, 23 Aug 2022 04:07:54 +0000 (UTC)
commit 107d83d7b03685258b26e59a8d6d9fdcb06ded0a
Author: Christian Hergert <chergert redhat com>
Date: Mon Aug 22 20:38:59 2022 -0700
libide/search: handle backspace more gracefully
src/libide/search/ide-search-results.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/search/ide-search-results.c b/src/libide/search/ide-search-results.c
index a3fdd7676..80278ca67 100644
--- a/src/libide/search/ide-search-results.c
+++ b/src/libide/search/ide-search-results.c
@@ -181,8 +181,10 @@ ide_search_results_refilter (IdeSearchResults *self,
/* Notify of changes, and only update the portion not matched */
if (g_str_has_prefix (query, old_query))
gtk_filter_changed (GTK_FILTER (self->filter), GTK_FILTER_CHANGE_MORE_STRICT);
- else
+ else if (g_str_has_prefix (old_query, query))
gtk_filter_changed (GTK_FILTER (self->filter), GTK_FILTER_CHANGE_LESS_STRICT);
+ else
+ gtk_filter_changed (GTK_FILTER (self->filter), GTK_FILTER_CHANGE_DIFFERENT);
/* Attach filter if we haven't yet */
if (gtk_filter_list_model_get_filter (self->filter_model) == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]