Skip to content

Commit

Permalink
Reveal the edit in a nicer way
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Oct 20, 2023
1 parent a52599f commit 65c96c7
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ ${content}
}
const editorEdit = new WorkspaceEdit();
editorEdit.insert(document.uri, new Position(document.lineCount, 0), content);
await this.documentManager.applyEdit(editorEdit); // Reveal the edits
const lastLine = new Position(document.lineCount, 0);
editor.revealRange(new Range(lastLine, lastLine), TextEditorRevealType.AtTop);
await this.documentManager.applyEdit(editorEdit);
// Reveal the edits.
editor.revealRange(
new Range(new Position(document.lineCount - 3, 0), new Position(document.lineCount, 0)),
TextEditorRevealType.AtTop,
);
}

private async openScript(command: string) {
Expand Down

0 comments on commit 65c96c7

Please sign in to comment.