[gtksourceview/gnome-3-10] SearchContext: do not emit the highlight-updated signal



commit c388d18803a6b828994cf8bccc5e0831aabb3f65
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Jan 21 22:27:40 2014 +0100

    SearchContext: do not emit the highlight-updated signal
    
    When the search was implemented in gedit, there was the
    search-highlight-updated signal, similar to the highlight-updated signal
    from GtkSourceBuffer. So when moving the search implementation in
    GtkSourceView, I reused the highlight-updated signal.
    
    I think the signal is no longer required for the search.
    
    Moreover, the search didn't send the signal at the right time. When
    g_signal_emit_by_name() was called, the start and end variables could be
    the entire buffer, resulting in performances problems when the spell
    gedit plugin was enabled with the Highlight Misspelled Words option
    (because the plugin connects to the signal, and rescan the specified
    region).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722535

 gtksourceview/gtksourcesearchcontext.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/gtksourceview/gtksourcesearchcontext.c b/gtksourceview/gtksourcesearchcontext.c
index 89af1da..7fe1c1d 100644
--- a/gtksourceview/gtksourcesearchcontext.c
+++ b/gtksourceview/gtksourcesearchcontext.c
@@ -2291,14 +2291,6 @@ add_subregion_to_scan (GtkSourceSearchContext *search,
        });
 
        install_idle_scan (search);
-
-       /* The highlighting can be modified a bit backward and forward the
-        * region.
-        */
-       gtk_text_iter_backward_lines (&start, search->priv->text_nb_lines);
-       gtk_text_iter_forward_lines (&end, search->priv->text_nb_lines);
-
-       g_signal_emit_by_name (search->priv->buffer, "highlight-updated", &start, &end);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]