From cbcc982d209b7e5784a1d615d92ae31d35bfaa86 Mon Sep 17 00:00:00 2001 From: Horace He Date: Thu, 18 May 2017 20:58:49 -0400 Subject: [PATCH] Fixed bug --- src/actions/commands/actions.ts | 1 + src/mode/modeHandler.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/commands/actions.ts b/src/actions/commands/actions.ts index cfafe5757aa..424cc87b6df 100644 --- a/src/actions/commands/actions.ts +++ b/src/actions/commands/actions.ts @@ -1776,6 +1776,7 @@ class CommandExitVisualMode extends BaseCommand { class CommandVisualMode extends BaseCommand { modes = [ModeName.Normal]; keys = ["v"]; + isCompleteAction = false; public async exec(position: Position, vimState: VimState): Promise { vimState.currentMode = ModeName.Visual; diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index 5aae8d0fd71..d0e76680fdd 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -1019,7 +1019,7 @@ export class ModeHandler implements vscode.Disposable { } ranRepeatableAction = (ranRepeatableAction && vimState.currentMode === ModeName.Normal) || this.createUndoPointForBrackets(vimState); - ranAction = ranAction && (vimState.currentMode !== ModeName.Insert); + ranAction = ranAction && (vimState.currentMode === ModeName.Normal || vimState.currentMode === ModeName.Visual); // Record down previous action and flush temporary state if (ranRepeatableAction) {