Skip to content

Commit

Permalink
fix cursor move
Browse files Browse the repository at this point in the history
  • Loading branch information
bux committed Dec 10, 2016
1 parent d8c67ab commit 2c2ac80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 9 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
});
});

Expand All @@ -69,4 +76,4 @@ export function activate(context: vscode.ExtensionContext) {

// this method is called when your extension is deactivated
export function deactivate() {
}
}

0 comments on commit 2c2ac80

Please sign in to comment.