[gnome-builder/wip/libide-merge] vim: :e, :edit with no filename should show open dialog



commit c57716cc6a8e2422bdc5ae78948280df53036818
Author: Christian Hergert <christian hergert me>
Date:   Sat Mar 21 15:17:54 2015 -0700

    vim: :e, :edit with no filename should show open dialog

 src/vim/gb-vim.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-vim.c b/src/vim/gb-vim.c
index 90a0d53..4b54396 100644
--- a/src/vim/gb-vim.c
+++ b/src/vim/gb-vim.c
@@ -22,6 +22,7 @@
 #include <glib/gi18n.h>
 #include <ide.h>
 
+#include "gb-string.h"
 #include "gb-vim.h"
 #include "gb-widget.h"
 
@@ -392,6 +393,12 @@ gb_vim_command_edit (GtkSourceView  *source_view,
                      const gchar    *options,
                      GError        **error)
 {
+  if (gb_str_empty0 (options))
+    {
+      gb_widget_activate_action (GTK_WIDGET (source_view), "workbench", "open", NULL);
+      return TRUE;
+    }
+
   return TRUE;
 }
 


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