mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 23:25:03 +00:00
Fix client-side snippets
This commit is contained in:
parent
e94d7c124f
commit
39ec581bf6
1 changed files with 2 additions and 1 deletions
|
@ -65,7 +65,8 @@ export function applySnippetWorkspaceEdit(_ctx: Ctx): Cmd {
|
||||||
let lineDelta = 0;
|
let lineDelta = 0;
|
||||||
await editor.edit((builder) => {
|
await editor.edit((builder) => {
|
||||||
for (const indel of edits) {
|
for (const indel of edits) {
|
||||||
if (indel.newText.indexOf('$0') !== -1) {
|
const isSnippet = indel.newText.indexOf('$0') !== -1 || indel.newText.indexOf('${') !== -1;
|
||||||
|
if (isSnippet) {
|
||||||
editWithSnippet = indel;
|
editWithSnippet = indel;
|
||||||
} else {
|
} else {
|
||||||
if (!editWithSnippet) {
|
if (!editWithSnippet) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue