Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vimode: Ignore special command handling in insert mode #1100

Merged
merged 1 commit into from
Sep 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vimode/src/cmd-runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,15 @@ 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
// above and a corresponding 1-letter command ~, u, U exists and
// 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
Expand Down