[gtksourceview/wip/chergert/vim] clear command text in insert



commit 42175762914c236c56d8a4d1cc4f2dfc06e49ee4
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 27 07:43:00 2021 -0700

    clear command text in insert

 gtksourceview/vim/gtk-source-vim-insert.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gtksourceview/vim/gtk-source-vim-insert.c b/gtksourceview/vim/gtk-source-vim-insert.c
index 022723c8..4ab28908 100644
--- a/gtksourceview/vim/gtk-source-vim-insert.c
+++ b/gtksourceview/vim/gtk-source-vim-insert.c
@@ -173,6 +173,14 @@ gtk_source_vim_insert_leave (GtkSourceVimState *state)
        gtk_text_buffer_end_user_action (GTK_TEXT_BUFFER (buffer));
 }
 
+static void
+gtk_source_vim_insert_append_command (GtkSourceVimState *state,
+                                      GString           *string)
+{
+       /* command should be empty during insert */
+       g_string_truncate (string, 0);
+}
+
 static void
 gtk_source_vim_insert_dispose (GObject *object)
 {
@@ -187,6 +195,7 @@ gtk_source_vim_insert_class_init (GtkSourceVimInsertClass *klass)
 
        object_class->dispose = gtk_source_vim_insert_dispose;
 
+       state_class->append_command = gtk_source_vim_insert_append_command;
        state_class->handle_event = gtk_source_vim_insert_handle_event;
        state_class->resume = gtk_source_vim_insert_resume;
        state_class->enter = gtk_source_vim_insert_enter;


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