[gnome-builder/wip/vim] vim: allow # search to not focus the search entry.



commit 463ee2f841cc2cb0968aa072ec572f7df55f9f6d
Author: Christian Hergert <christian hergert me>
Date:   Tue Sep 30 12:04:01 2014 -0700

    vim: allow # search to not focus the search entry.

 src/editor/gb-editor-vim.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 7e4298d..5bd0c58 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -963,6 +963,13 @@ gb_editor_vim_reverse_search (GbEditorVim *vim)
       text = gtk_text_iter_get_slice (&begin, &end);
       gb_source_view_begin_search (source_view, GTK_DIR_UP, text);
       g_free (text);
+
+      /*
+       * But don't let the search entry focus. VIM let's us just keep hitting
+       * '#' over and over without any intervention, and that's a useful
+       * feature.
+       */
+      gtk_widget_grab_focus (GTK_WIDGET (vim->priv->text_view));
     }
 }
 


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