From 65c96c71c8641f1381372dc7e95a5df24d0789dd Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Fri, 20 Oct 2023 00:31:54 +0000 Subject: [PATCH] Reveal the edit in a nicer way --- .../envCollectionActivation/deactivatePrompt.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/client/terminals/envCollectionActivation/deactivatePrompt.ts b/src/client/terminals/envCollectionActivation/deactivatePrompt.ts index 9ebad73e31343..ce79598f87490 100644 --- a/src/client/terminals/envCollectionActivation/deactivatePrompt.ts +++ b/src/client/terminals/envCollectionActivation/deactivatePrompt.ts @@ -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) {