[gtksourceview/wip/chergert/vim] clear on parse failure



commit dff3f8c325076b66129da712202e8760af6df6a8
Author: Christian Hergert <chergert redhat com>
Date:   Thu Oct 21 16:39:21 2021 -0700

    clear on parse failure

 gtksourceview/vim/gtk-source-vim-normal.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-normal.c b/gtksourceview/vim/gtk-source-vim-normal.c
index 7ce4b178..eeb9efb5 100644
--- a/gtksourceview/vim/gtk-source-vim-normal.c
+++ b/gtksourceview/vim/gtk-source-vim-normal.c
@@ -434,10 +434,13 @@ key_handler_initial (GtkSourceVimNormal *self,
                }
        }
 
-       if (self->handler != key_handler_initial)
-               return self->handler (self, keyval, keycode, mods, string);
+       if (self->handler == key_handler_initial)
+       {
+               gtk_source_vim_normal_clear (self);
+               return FALSE;
+       }
 
-       return FALSE;
+       return self->handler (self, keyval, keycode, mods, string);
 }
 
 static gboolean


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