[gnome-builder] editor-frame: change search direction when up and down arrow are pressed



commit 73e0775d69f230cea41c9ce39cdfc9342efdf6a3
Author: Ray Strode <rstrode redhat com>
Date:   Sun Oct 11 15:10:25 2015 -0400

    editor-frame: change search direction when up and down arrow are pressed
    
    Rather than making UP search backwards and DOWN search forwards, making
    them set the current search direction, and then search in the same
    direction as the current search direction.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756405

 src/editor/gb-editor-frame.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-editor-frame.c b/src/editor/gb-editor-frame.c
index a8d85b5..c0dd43a 100644
--- a/src/editor/gb-editor-frame.c
+++ b/src/editor/gb-editor-frame.c
@@ -489,11 +489,13 @@ gb_editor_frame__search_key_press_event (GbEditorFrame *self,
       return GDK_EVENT_STOP;
 
     case GDK_KEY_Down:
+      ide_source_view_set_search_direction (self->source_view, GTK_DIR_DOWN);
       gb_widget_activate_action (GTK_WIDGET (self), "frame", "next-search-result", NULL);
       return GDK_EVENT_STOP;
 
     case GDK_KEY_Up:
-      gb_widget_activate_action (GTK_WIDGET (self), "frame", "previous-search-result", NULL);
+      ide_source_view_set_search_direction (self->source_view, GTK_DIR_UP);
+      gb_widget_activate_action (GTK_WIDGET (self), "frame", "next-search-result", NULL);
       return GDK_EVENT_STOP;
 
     default:


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