[gtksourceview/wip/chergert/vim: 201/293] make dw/dW/de/dE etc work
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim: 201/293] make dw/dW/de/dE etc work
- Date: Fri, 5 Nov 2021 04:23:04 +0000 (UTC)
commit 9c468f08dd4726a43b96c2d6cea314b6eabb8170
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 2 09:35:31 2021 -0700
make dw/dW/de/dE etc work
gtksourceview/vim/gtk-source-vim-normal.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-normal.c b/gtksourceview/vim/gtk-source-vim-normal.c
index d1975011..403f4392 100644
--- a/gtksourceview/vim/gtk-source-vim-normal.c
+++ b/gtksourceview/vim/gtk-source-vim-normal.c
@@ -93,7 +93,7 @@ gtk_source_vim_normal_begin_delete (GtkSourceVimNormal *self,
GtkSourceVimState *del;
g_assert (GTK_SOURCE_IS_VIM_NORMAL (self));
- g_assert (GTK_SOURCE_IS_VIM_MOTION (motion));
+ g_assert (!motion || GTK_SOURCE_IS_VIM_MOTION (motion));
del = gtk_source_vim_delete_new (GTK_SOURCE_VIM_MOTION (motion));
@@ -684,18 +684,6 @@ key_handler_yank (GtkSourceVimNormal *self,
return TRUE;
}
-static gboolean
-key_handler_delete (GtkSourceVimNormal *self,
- guint keyval,
- guint keycode,
- GdkModifierType mods,
- const char *string)
-{
- g_assert (GTK_SOURCE_IS_VIM_NORMAL (self));
-
- return TRUE;
-}
-
static gboolean
key_handler_split (GtkSourceVimNormal *self,
guint keyval,
@@ -906,8 +894,8 @@ key_handler_initial (GtkSourceVimNormal *self,
return TRUE;
case GDK_KEY_d:
- self->handler = key_handler_delete;
- break;
+ gtk_source_vim_normal_begin_delete (self, NULL, NULL);
+ return TRUE;
case GDK_KEY_c:
self->handler = key_handler_c;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]