[gnome-builder] editor-frame: set previous search string properly



commit d15f8dbc79e83d6d846bb59a05d6bab8e96474f4
Author: Fangwen Yu <yynyygy gmail com>
Date:   Fri May 6 15:57:30 2016 +0800

    editor-frame: set previous search string properly
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766045

 libide/editor/ide-editor-frame.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libide/editor/ide-editor-frame.c b/libide/editor/ide-editor-frame.c
index 2331a27..d459053 100644
--- a/libide/editor/ide-editor-frame.c
+++ b/libide/editor/ide-editor-frame.c
@@ -528,6 +528,10 @@ ide_editor_frame__search_key_press_event (IdeEditorFrame *self,
 
     case GDK_KEY_KP_Enter:
     case GDK_KEY_Return:
+      /* stash the search string for later */
+      g_free (self->previous_search_string);
+      g_object_get (self->search_entry, "text", &self->previous_search_string, NULL);
+
       ide_widget_action (GTK_WIDGET (self), "frame", "next-search-result", NULL);
       gtk_widget_grab_focus (GTK_WIDGET (self->source_view));
       return GDK_EVENT_STOP;


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