[gtksourceview] vim: fix ^W movement commands



commit 085d5c13788b4c37af7cafed44cea015cd8b4f27
Author: Christian Hergert <chergert redhat com>
Date:   Fri Dec 17 13:23:18 2021 -0800

    vim: fix ^W movement commands
    
    Also, ensure we bail on failure properly.

 gtksourceview/vim/gtksourcevimnormal.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/vim/gtksourcevimnormal.c b/gtksourceview/vim/gtksourcevimnormal.c
index f3fe4f6f..81a716d4 100644
--- a/gtksourceview/vim/gtksourcevimnormal.c
+++ b/gtksourceview/vim/gtksourcevimnormal.c
@@ -1009,6 +1009,10 @@ key_handler_split (GtkSourceVimNormal *self,
        case GDK_KEY_v:
        case GDK_KEY_s:
        case GDK_KEY_w:
+       case GDK_KEY_h:
+       case GDK_KEY_l:
+       case GDK_KEY_j:
+       case GDK_KEY_k:
                if ((root = gtk_source_vim_state_get_root (GTK_SOURCE_VIM_STATE (self))) &&
                    GTK_SOURCE_IS_VIM (root))
                {
@@ -1017,10 +1021,10 @@ key_handler_split (GtkSourceVimNormal *self,
                        return TRUE;
                }
 
-               return gtk_source_vim_normal_bail (self);
+               G_GNUC_FALLTHROUGH;
 
        default:
-               return FALSE;
+               return gtk_source_vim_normal_bail (self);
        }
 }
 


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