mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
fix: reveal snippets
This commit is contained in:
parent
1605488710
commit
a6633a88a8
1 changed files with 3 additions and 0 deletions
|
@ -56,6 +56,9 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs
|
|||
}
|
||||
});
|
||||
if (selections.length > 0) editor.selections = selections;
|
||||
if (selections.length === 1) {
|
||||
editor.revealRange(selections[0], vscode.TextEditorRevealType.InCenterIfOutsideViewport);
|
||||
}
|
||||
}
|
||||
|
||||
function parseSnippet(snip: string): [string, [number, number]] | undefined {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue