[gtksourceview] vim: support / and ? to search from visual
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] vim: support / and ? to search from visual
- Date: Sat, 13 Nov 2021 00:17:01 +0000 (UTC)
commit d6fcc7044d7e0f30c317adee6ba1b72b5d70ea26
Author: Christian Hergert <chergert redhat com>
Date: Fri Nov 12 16:16:46 2021 -0800
vim: support / and ? to search from visual
gtksourceview/vim/gtksourcevimvisual.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/gtksourceview/vim/gtksourcevimvisual.c b/gtksourceview/vim/gtksourcevimvisual.c
index 0850351e..c969b036 100644
--- a/gtksourceview/vim/gtksourcevimvisual.c
+++ b/gtksourceview/vim/gtksourcevimvisual.c
@@ -597,6 +597,16 @@ key_handler_initial (GtkSourceVimVisual *self,
case GDK_KEY_less:
return gtk_source_vim_visual_begin_command (self, "unindent", FALSE);
+ case GDK_KEY_slash:
+ case GDK_KEY_question:
+ {
+ GtkSourceVimState *new_state = gtk_source_vim_command_bar_new ();
+ gtk_source_vim_command_bar_set_text (GTK_SOURCE_VIM_COMMAND_BAR (new_state),
+ keyval == GDK_KEY_slash ? "/" : "?");
+ gtk_source_vim_state_push (GTK_SOURCE_VIM_STATE (self), new_state);
+ return TRUE;
+ }
+
case GDK_KEY_colon:
{
GtkSourceVimState *new_state = gtk_source_vim_command_bar_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]