[gnome-builder] vim: wire up `e' command to execute open action.



commit fd20515e10a181c0a2125aaedb1432dc46daa21e
Author: Christian Hergert <christian hergert me>
Date:   Mon Oct 6 15:37:56 2014 -0700

    vim: wire up `e' command to execute open action.
    
    Long term, this will all be abstracted, but helpful for the time being.

 src/editor/gb-editor-tab.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index 9acb634..ec72794 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -1042,9 +1042,16 @@ on_vim_command_entry_activate (GtkEntry    *entry,
 
   if (g_str_equal (text, "w"))
     {
+      gb_editor_vim_set_mode (tab->priv->vim, GB_EDITOR_VIM_NORMAL);
       action = g_action_map_lookup_action (G_ACTION_MAP (actions), "save");
       g_action_activate (action, NULL);
+      return;
+    }
+  else if (g_str_equal (text, "e"))
+    {
       gb_editor_vim_set_mode (tab->priv->vim, GB_EDITOR_VIM_NORMAL);
+      action = g_action_map_lookup_action (G_ACTION_MAP (actions), "open");
+      g_action_activate (action, NULL);
       return;
     }
 


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