[gtksourceview] vim: implement ctrl+u for commandbar



commit 1529ffeaab66c0580405768c7f8f45143dfe3901
Author: Christian Hergert <chergert redhat com>
Date:   Mon Dec 6 23:33:41 2021 -0800

    vim: implement ctrl+u for commandbar

 gtksourceview/vim/gtksourcevimcommandbar.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/gtksourceview/vim/gtksourcevimcommandbar.c b/gtksourceview/vim/gtksourcevimcommandbar.c
index a8e4a4d5..f558a702 100644
--- a/gtksourceview/vim/gtksourcevimcommandbar.c
+++ b/gtksourceview/vim/gtksourcevimcommandbar.c
@@ -225,6 +225,16 @@ gtk_source_vim_command_bar_handle_keypress (GtkSourceVimState *state,
                        gtk_source_vim_state_pop (state);
                        return TRUE;
 
+               case GDK_KEY_u:
+                       if (mods & GDK_CONTROL_MASK)
+                       {
+                               g_string_truncate (self->buffer, 1);
+                               do_notify (self);
+                               return TRUE;
+                       }
+
+                       break;
+
                default:
                        break;
        }


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