diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index c5677128711..4e123f822e1 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -488,7 +488,10 @@ export class ModeHandler implements vscode.Disposable { var newPosition = new Position(selection.active.line, selection.active.character); if (newPosition.character >= newPosition.getLineEnd().character) { - newPosition = new Position(newPosition.line, Math.max(newPosition.getLineEnd().character - 1, 0)); + if (this._vimState.currentMode !== ModeName.Insert) { + // This prevents you from mouse clicking past the EOL + newPosition = new Position(newPosition.line, Math.max(newPosition.getLineEnd().character - 1, 0)); + } } this._vimState.cursorPosition = newPosition; @@ -1302,4 +1305,4 @@ export class ModeHandler implements vscode.Disposable { dispose() { // do nothing } -} \ No newline at end of file +}