[gnome-builder/wip/vim] vim: start from zero mode



commit 14e11d245dce714cf4e66434c11986a4cb3ca5c6
Author: Christian Hergert <christian hergert me>
Date:   Thu Oct 2 00:25:12 2014 -0700

    vim: start from zero mode
    
    Otherwise, we fail to transition into NORMAL correctly.

 src/editor/gb-editor-vim.c |    4 +++-
 src/editor/gb-editor-vim.h |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index b6aeb48..172116c 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -2104,6 +2104,8 @@ gb_editor_vim_disconnect (GbEditorVim *vim)
                                vim->priv->delete_range_handler);
   vim->priv->delete_range_handler = 0;
 
+  vim->priv->mode = 0;
+
   vim->priv->connected = FALSE;
 }
 
@@ -3027,7 +3029,7 @@ gb_editor_vim_init (GbEditorVim *vim)
 {
   vim->priv = gb_editor_vim_get_instance_private (vim);
   vim->priv->enabled = FALSE;
-  vim->priv->mode = GB_EDITOR_VIM_NORMAL;
+  vim->priv->mode = 0;
   vim->priv->phrase = g_string_new (NULL);
 }
 
diff --git a/src/editor/gb-editor-vim.h b/src/editor/gb-editor-vim.h
index 8b7d039..b34e8f9 100644
--- a/src/editor/gb-editor-vim.h
+++ b/src/editor/gb-editor-vim.h
@@ -38,7 +38,7 @@ typedef struct _GbEditorVimPrivate GbEditorVimPrivate;
 
 typedef enum
 {
-  GB_EDITOR_VIM_NORMAL,
+  GB_EDITOR_VIM_NORMAL = 1,
   GB_EDITOR_VIM_INSERT,
   GB_EDITOR_VIM_COMMAND,
 } GbEditorVimMode;


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