mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Fix client-side snippets
This commit is contained in:
parent
e94d7c124f
commit
39ec581bf6
@ -65,7 +65,8 @@ export function applySnippetWorkspaceEdit(_ctx: Ctx): Cmd {
|
||||
let lineDelta = 0;
|
||||
await editor.edit((builder) => {
|
||||
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;
|
||||
} else {
|
||||
if (!editWithSnippet) {
|
||||
|
Loading…
Reference in New Issue
Block a user