[gnome-builder/wip/chergert/editorsearch] editor: improve directions with n or N in vim mode



commit 7e115603ccae0a6012c7faa92f017d34d5308416
Author: Christian Hergert <chergert redhat com>
Date:   Tue Oct 10 22:54:54 2017 -0700

    editor: improve directions with n or N in vim mode

 src/libide/editor/ide-editor-view.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-view.c b/src/libide/editor/ide-editor-view.c
index 610c752..a636c39 100644
--- a/src/libide/editor/ide-editor-view.c
+++ b/src/libide/editor/ide-editor-view.c
@@ -628,6 +628,10 @@ ide_editor_view_move_search (IdeEditorView    *self,
     {
     case GTK_DIR_DOWN:
     case GTK_DIR_RIGHT:
+      ide_editor_search_set_reverse (self->search, FALSE);
+      ide_editor_search_move (self->search, IDE_EDITOR_SEARCH_FORWARD);
+      break;
+
     case GTK_DIR_TAB_FORWARD:
       if (extend_selection)
         ide_editor_search_move (self->search, IDE_EDITOR_SEARCH_FORWARD);
@@ -637,6 +641,10 @@ ide_editor_view_move_search (IdeEditorView    *self,
 
     case GTK_DIR_UP:
     case GTK_DIR_LEFT:
+      ide_editor_search_set_reverse (self->search, TRUE);
+      ide_editor_search_move (self->search, IDE_EDITOR_SEARCH_BACKWARD);
+      break;
+
     case GTK_DIR_TAB_BACKWARD:
       if (extend_selection)
         ide_editor_search_move (self->search, IDE_EDITOR_SEARCH_BACKWARD);


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