Skip to content

Commit c6a7994

Browse files
authored
fix: map optionalReplacementSpan for typescript-language-server (#2257)
#2251 For typescript plugin
1 parent e1eacce commit c6a7994

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/typescript-plugin/src/language-service/completions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ export function decorateCompletions(
4040
}
4141
return c;
4242
});
43+
44+
if (completions.optionalReplacementSpan) {
45+
completions.optionalReplacementSpan = {
46+
...completions.optionalReplacementSpan,
47+
start: toOriginalPos(completions.optionalReplacementSpan.start).pos
48+
};
49+
}
4350
}
4451
}
4552

0 commit comments

Comments
 (0)