[gtksourceview/wip/chergert/vim: 87/363] fix replace mode




commit 8de31e90a5ba56724ca164f9e6aaba69f8cb7f3a
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 27 12:26:41 2021 -0700

    fix replace mode

 gtksourceview/vim/gtk-source-vim-normal.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-normal.c b/gtksourceview/vim/gtk-source-vim-normal.c
index f5ba5add..d95d434b 100644
--- a/gtksourceview/vim/gtk-source-vim-normal.c
+++ b/gtksourceview/vim/gtk-source-vim-normal.c
@@ -241,15 +241,12 @@ key_handler_command (GtkSourceVimNormal *self,
                      GdkModifierType     mods,
                      const char         *string)
 {
-       GtkSourceVimState *new_state = NULL;
-
        g_assert (GTK_SOURCE_IS_VIM_NORMAL (self));
 
        switch (keyval)
        {
                case GDK_KEY_R:
-                       new_state = gtk_source_vim_replace_new ();
-                       gtk_source_vim_state_push (GTK_SOURCE_VIM_STATE (self), new_state);
+                       gtk_source_vim_state_push (GTK_SOURCE_VIM_STATE (self), gtk_source_vim_replace_new 
());
                        return TRUE;
 
                case GDK_KEY_i:
@@ -733,6 +730,7 @@ key_handler_initial (GtkSourceVimNormal *self,
                        case GDK_KEY_p:
                        case GDK_KEY_P:
                        case GDK_KEY_period:
+                       case GDK_KEY_R:
                        case GDK_KEY_s:
                        case GDK_KEY_S:
                        case GDK_KEY_x:


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