[gtksourceview/wip/search] search: cancel running task on buffer modification



commit 8ffd649e1a43d0087feadfad6d96ac833e9cc65c
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Jun 26 15:35:04 2013 +0200

    search: cancel running task on buffer modification

 gtksourceview/gtksourcesearch.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcesearch.c b/gtksourceview/gtksourcesearch.c
index 98f3324..a2023b1 100644
--- a/gtksourceview/gtksourcesearch.c
+++ b/gtksourceview/gtksourcesearch.c
@@ -1125,6 +1125,8 @@ insert_text_before_cb (GtkSourceSearch *search,
                       gchar           *text,
                       gint             length)
 {
+       clear_task (search);
+
        if (search->priv->text != NULL)
        {
                GtkTextIter start = *location;
@@ -1160,6 +1162,8 @@ delete_range_before_cb (GtkSourceSearch *search,
        GtkTextIter start_buffer;
        GtkTextIter end_buffer;
 
+       clear_task (search);
+
        gtk_text_buffer_get_bounds (search->priv->buffer, &start_buffer, &end_buffer);
 
        if (gtk_text_iter_equal (delete_start, &start_buffer) &&


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