[gtksourceview/wip/chergert/vim: 262/293] fix some improper insert with repeat




commit 813e008052af82a57de9a1261a29b5a6b018555a
Author: Christian Hergert <chergert redhat com>
Date:   Wed Nov 3 15:04:04 2021 -0700

    fix some improper insert with repeat

 gtksourceview/vim/gtk-source-vim-text-history.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-text-history.c b/gtksourceview/vim/gtk-source-vim-text-history.c
index 42d5b567..89600b7e 100644
--- a/gtksourceview/vim/gtk-source-vim-text-history.c
+++ b/gtksourceview/vim/gtk-source-vim-text-history.c
@@ -133,10 +133,12 @@ gtk_source_vim_text_history_delete_range_cb (GtkSourceVimTextHistory *self,
        if (gtk_text_iter_get_offset (&a) == self->cursor_position)
        {
                op.kind = OP_DELETE;
+               g_array_append_val (self->ops, op);
        }
        else if (gtk_text_iter_get_offset (&b) == self->cursor_position)
        {
                op.kind = OP_BACKSPACE;
+               g_array_append_val (self->ops, op);
        }
        else
        {
@@ -144,8 +146,6 @@ gtk_source_vim_text_history_delete_range_cb (GtkSourceVimTextHistory *self,
        }
 
        self->cursor_position = gtk_text_iter_get_offset (&a);
-
-       g_array_append_val (self->ops, op);
 }
 
 static void


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