[gtksourceview/wip/chergert/vim: 214/363] some commands cannot be repeat (:yank)




commit 3dcb6a95433ee7941ddb1aec871dc1956a2a78eb
Author: Christian Hergert <chergert redhat com>
Date:   Tue Nov 2 13:54:39 2021 -0700

    some commands cannot be repeat (:yank)

 gtksourceview/vim/gtk-source-vim-visual.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-visual.c b/gtksourceview/vim/gtk-source-vim-visual.c
index 3034df74..157a5012 100644
--- a/gtksourceview/vim/gtk-source-vim-visual.c
+++ b/gtksourceview/vim/gtk-source-vim-visual.c
@@ -282,12 +282,15 @@ gtk_source_vim_visual_begin_command (GtkSourceVimVisual *self,
        gtk_source_vim_visual_clear (self);
        g_clear_object (&self->command);
 
-       gtk_source_vim_state_set_can_repeat (GTK_SOURCE_VIM_STATE (self), TRUE);
-
        self->command = gtk_source_vim_command_new (command);
        gtk_source_vim_state_set_parent (self->command, GTK_SOURCE_VIM_STATE (self));
        gtk_source_vim_state_repeat (self->command);
 
+       if (gtk_source_vim_state_get_can_repeat (self->command))
+       {
+               gtk_source_vim_state_set_can_repeat (GTK_SOURCE_VIM_STATE (self), TRUE);
+       }
+
        gtk_source_vim_state_pop (GTK_SOURCE_VIM_STATE (self));
 
        return TRUE;


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