From 2c2ac80a5fb6c1be095b2b31acea8221179488f2 Mon Sep 17 00:00:00 2001 From: bux578 Date: Sat, 10 Dec 2016 11:49:30 +0100 Subject: [PATCH] fix cursor move --- package.json | 2 +- src/extension.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f3276c4..4790875 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-openlastrpt", "displayName": "Open Last RPT", "description": "Quickly opens the last Arma 3 log file (`*.rpt`).", - "version": "1.0.0", + "version": "1.0.1", "publisher": "bux578", "engines": { "vscode": "^1.5.0" diff --git a/src/extension.ts b/src/extension.ts index 48cf9f5..1d4c985 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -58,7 +58,14 @@ export function activate(context: vscode.ExtensionContext) { // then show it vscode.window.showTextDocument(document, 1, false).then((editor) => { // and move the cursor to the end - editor.selections = [new vscode.Selection(new vscode.Position(editor.document.lineCount, 0),new vscode.Position(editor.document.lineCount, 0))]; + + vscode.commands.executeCommand("cursorBottom"); + vscode.commands.executeCommand("cursorMove", { + to: "right", + by: "wrappedLine", + select: false, + value: 1 + }); }); }); @@ -69,4 +76,4 @@ export function activate(context: vscode.ExtensionContext) { // this method is called when your extension is deactivated export function deactivate() { -} \ No newline at end of file +}