[gnome-builder/wip/vim] vim: slash should initiate search.



commit f6abee4a9ebac96310d6514e2b58cd64332c349e
Author: Christian Hergert <christian hergert me>
Date:   Mon Sep 29 16:26:45 2014 -0700

    vim: slash should initiate search.

 src/editor/gb-editor-vim.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 7cb2563..a4b21a9 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -23,6 +23,7 @@
 
 #include "gb-editor-vim.h"
 #include "gb-log.h"
+#include "gb-source-view.h"
 
 struct _GbEditorVimPrivate
 {
@@ -682,6 +683,18 @@ gb_editor_vim_handle_normal (GbEditorVim *vim,
 
       break;
 
+    case GDK_KEY_slash:
+      /*
+       * Focus the search entry for the source view.
+       */
+      if (GB_IS_SOURCE_VIEW (vim->priv->text_view))
+        {
+          gb_source_view_begin_search (GB_SOURCE_VIEW (vim->priv->text_view));
+          return TRUE;
+        }
+
+      break;
+
     default:
       break;
     }


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