[gtksourceview] search: disable matching brackets highlighting when replace all
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] search: disable matching brackets highlighting when replace all
- Date: Fri, 12 Jul 2013 18:39:58 +0000 (UTC)
commit a6087783e01b00aa4a7c7b236f2c7936634427ef
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Jul 12 20:38:17 2013 +0200
search: disable matching brackets highlighting when replace all
gtksourceview/gtksourcesearch.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcesearch.c b/gtksourceview/gtksourcesearch.c
index f1a190e..8d3c5d8 100644
--- a/gtksourceview/gtksourcesearch.c
+++ b/gtksourceview/gtksourcesearch.c
@@ -2097,6 +2097,7 @@ _gtk_source_search_replace_all (GtkSourceSearch *search,
GtkTextIter match_start;
GtkTextIter match_end;
guint nb_matches_replaced = 0;
+ gboolean highlight_matching_brackets;
g_return_val_if_fail (GTK_SOURCE_IS_SEARCH (search), 0);
g_return_val_if_fail (replace != NULL, 0);
@@ -2111,6 +2112,12 @@ _gtk_source_search_replace_all (GtkSourceSearch *search,
g_signal_handlers_block_by_func (search->priv->buffer, delete_range_before_cb, search);
g_signal_handlers_block_by_func (search->priv->buffer, delete_range_after_cb, search);
+ highlight_matching_brackets =
+ gtk_source_buffer_get_highlight_matching_brackets (GTK_SOURCE_BUFFER (search->priv->buffer));
+
+ gtk_source_buffer_set_highlight_matching_brackets (GTK_SOURCE_BUFFER (search->priv->buffer),
+ FALSE);
+
gtk_text_buffer_get_start_iter (search->priv->buffer, &iter);
gtk_text_buffer_begin_user_action (search->priv->buffer);
@@ -2126,6 +2133,9 @@ _gtk_source_search_replace_all (GtkSourceSearch *search,
gtk_text_buffer_end_user_action (search->priv->buffer);
+ gtk_source_buffer_set_highlight_matching_brackets (GTK_SOURCE_BUFFER (search->priv->buffer),
+ highlight_matching_brackets);
+
g_signal_handlers_unblock_by_func (search->priv->buffer, insert_text_before_cb, search);
g_signal_handlers_unblock_by_func (search->priv->buffer, insert_text_after_cb, search);
g_signal_handlers_unblock_by_func (search->priv->buffer, delete_range_before_cb, search);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]