[gnome-builder/wip/libide-merge] support :w and :wq



commit 9ba188ab150299ff6c9b80af6d8fc40b94ac325b
Author: Christian Hergert <christian hergert me>
Date:   Fri Mar 20 01:43:56 2015 -0700

    support :w and :wq

 src/vim/gb-vim.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-vim.c b/src/vim/gb-vim.c
index 1975603..a4f8e24 100644
--- a/src/vim/gb-vim.c
+++ b/src/vim/gb-vim.c
@@ -16,11 +16,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#define G_LOG_DOMAIN "gb-vim"
+
 #include <errno.h>
 #include <glib/gi18n.h>
 #include <ide.h>
 
 #include "gb-vim.h"
+#include "gb-widget.h"
 
 G_DEFINE_QUARK (gb-vim-error-quark, gb_vim_error)
 
@@ -398,6 +401,8 @@ gb_vim_command_quit (GtkSourceView  *source_view,
                      const gchar    *options,
                      GError        **error)
 {
+  gb_widget_activate_action (GTK_WIDGET (source_view), "view", "save", NULL);
+  gb_widget_activate_action (GTK_WIDGET (source_view), "view", "close", NULL);
   return TRUE;
 }
 
@@ -425,6 +430,7 @@ gb_vim_command_write (GtkSourceView  *source_view,
                       const gchar    *options,
                       GError        **error)
 {
+  gb_widget_activate_action (GTK_WIDGET (source_view), "view", "save", NULL);
   return TRUE;
 }
 


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