From 152c72280af26b1ca87a0ad9ebb3c7ce8007a84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Tue, 17 Aug 2021 15:26:36 -0700 Subject: [PATCH] vimode: Ignore special command handling in insert mode This special command handling is not related to insert mode and causes problems in "insert mode for dummies". Fixes #1075. --- vimode/src/cmd-runner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vimode/src/cmd-runner.c b/vimode/src/cmd-runner.c index 2dc315402..4e72efc6c 100644 --- a/vimode/src/cmd-runner.c +++ b/vimode/src/cmd-runner.c @@ -507,7 +507,7 @@ static CmdDef *get_cmd_to_run(GSList *kpl, CmdDef *cmds, gboolean have_selection if (cmd->cmd == c) return cmd; } - else if (prev && prev->key == GDK_KEY_g) + else if (prev && prev->key == GDK_KEY_g && !VI_IS_INSERT(mode)) { // takes care of operator commands like g~, gu, gU where we // have no selection yet so the 2-letter command isn't found @@ -515,7 +515,7 @@ static CmdDef *get_cmd_to_run(GSList *kpl, CmdDef *cmds, gboolean have_selection // would be used instead of waiting for the full command } else if (is_cmdpart(kpl, text_object_cmds) && - get_cmd_to_run(below, operator_cmds, TRUE)) + get_cmd_to_run(below, operator_cmds, TRUE) && !VI_IS_INSERT(mode)) { // if we received "a" or "i", we have to check if there's not // an operator command below because these can be part of