From 1a55f891c7364ba705654a3dc815d4f36cd8d749 Mon Sep 17 00:00:00 2001 From: Jason Fields Date: Thu, 27 Aug 2020 12:09:23 -0400 Subject: [PATCH] Fix closing parameter hints Tried to do this in fd3ae79d9ab8ee1af59794b00591b7d6e3400a07, but neglected that in insert mode is handled by a different action. --- src/actions/commands/actions.ts | 2 -- src/actions/commands/insert.ts | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/commands/actions.ts b/src/actions/commands/actions.ts index 602e69877..6fbe436b5 100644 --- a/src/actions/commands/actions.ts +++ b/src/actions/commands/actions.ts @@ -413,8 +413,6 @@ class CommandEsc extends BaseCommand { } else { vimState.isMultiCursor = false; } - } else if (vimState.currentMode === Mode.Insert) { - vscode.commands.executeCommand('closeParameterHints'); } if (vimState.currentMode === Mode.EasyMotionMode) { diff --git a/src/actions/commands/insert.ts b/src/actions/commands/insert.ts index 6b201b78d..db3aaf302 100644 --- a/src/actions/commands/insert.ts +++ b/src/actions/commands/insert.ts @@ -34,6 +34,8 @@ class CommandEscInsertMode extends BaseCommand { } public async exec(position: Position, vimState: VimState): Promise { + vscode.commands.executeCommand('closeParameterHints'); + vimState.cursors = vimState.cursors.map((x) => x.withNewStop(x.stop.getLeft())); if (vimState.returnToInsertAfterCommand && position.character !== 0) { vimState.cursors = vimState.cursors.map((x) => x.withNewStop(x.stop.getRight()));