Skip to content

Commit 86311ca

Browse files
ayazhafizKeen Yee Liau
authored andcommitted
fixup! deps: update vscode-languageclient to 6.0.0
1 parent a1d9d6e commit 86311ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/session.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,12 @@ export class Session {
229229
return;
230230
}
231231
for (const change of contentChanges) {
232-
if (change.range) {
232+
if ('range' in change) {
233233
const [start, end] = lspRangeToTsPositions(scriptInfo, change.range);
234234
scriptInfo.editContent(start, end, change.text);
235+
} else {
236+
// New text is considered to be the full content of the document.
237+
scriptInfo.editContent(0, change.text.length, change.text);
235238
}
236239
}
237240

0 commit comments

Comments
 (0)