Skip to content

Commit a6633a8

Browse files
committed
fix: reveal snippets
1 parent 1605488 commit a6633a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

editors/code/src/snippets.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs
5656
}
5757
});
5858
if (selections.length > 0) editor.selections = selections;
59+
if (selections.length === 1) {
60+
editor.revealRange(selections[0], vscode.TextEditorRevealType.InCenterIfOutsideViewport);
61+
}
5962
}
6063

6164
function parseSnippet(snip: string): [string, [number, number]] | undefined {

0 commit comments

Comments
 (0)