[gtksourceview/wip/chergert/vim: 267/363] use delete command
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim: 267/363] use delete command
- Date: Mon, 8 Nov 2021 19:53:53 +0000 (UTC)
commit b3b9772a720a2ed315a3f459117f25f1e50c3dfb
Author: Christian Hergert <chergert redhat com>
Date: Wed Nov 3 16:50:10 2021 -0700
use delete command
gtksourceview/vim/gtk-source-vim-visual.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-visual.c b/gtksourceview/vim/gtk-source-vim-visual.c
index 135d6305..6bcae98e 100644
--- a/gtksourceview/vim/gtk-source-vim-visual.c
+++ b/gtksourceview/vim/gtk-source-vim-visual.c
@@ -386,25 +386,6 @@ gtk_source_vim_visual_begin_command (GtkSourceVimVisual *self,
return TRUE;
}
-static gboolean
-gtk_source_vim_visual_delete (GtkSourceVimVisual *self)
-{
- g_assert (GTK_SOURCE_IS_VIM_VISUAL (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_delete_new (NULL);
- gtk_source_vim_state_set_parent (self->command, GTK_SOURCE_VIM_STATE (self));
- gtk_source_vim_state_repeat (self->command);
-
- gtk_source_vim_state_pop (GTK_SOURCE_VIM_STATE (self));
-
- return TRUE;
-}
-
static gboolean
gtk_source_vim_visual_try_motion (GtkSourceVimVisual *self,
guint keyval,
@@ -566,7 +547,7 @@ key_handler_initial (GtkSourceVimVisual *self,
case GDK_KEY_d:
case GDK_KEY_x:
- return gtk_source_vim_visual_delete (self);
+ return gtk_source_vim_visual_begin_command (self, ":delete");
case GDK_KEY_quotedbl:
self->handler = key_handler_register;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]