[gnome-builder] search: set search text to empty to clear highlight
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] search: set search text to empty to clear highlight
- Date: Mon, 7 Mar 2016 01:31:27 +0000 (UTC)
commit 28d84a89fb1da408218d9cd97b6e71775fe6c94a
Author: Fangwen Yu <yynyygy gmail com>
Date: Sun Mar 6 02:33:21 2016 +0800
search: set search text to empty to clear highlight
We should clear highlight by setting search text to empty,
instead of setting the "highlight" property to FALSE, which
disables incremental search in effect.
https://bugzilla.gnome.org/show_bug.cgi?id=763128
libide/ide-source-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index bfb76c6..57123af 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -2796,10 +2796,12 @@ static void
ide_source_view_real_clear_search (IdeSourceView *self)
{
IdeSourceViewPrivate *priv = ide_source_view_get_instance_private (self);
+ GtkSourceSearchSettings *search_settings;
g_assert (IDE_IS_SOURCE_VIEW (self));
- gtk_source_search_context_set_highlight (priv->search_context, FALSE);
+ search_settings = gtk_source_search_context_get_settings (priv->search_context);
+ gtk_source_search_settings_set_search_text (search_settings, "");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]