Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 0c59bb3

Browse files
author
Jason Williams
committed
add comment about deducting the wrapper
1 parent ad911a6 commit 0c59bb3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/_language-service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ function translateCompetionEntry(
423423
kindModifiers: getKindModifiers(item),
424424
sortText: item.sortText || item.label,
425425
replacementSpan: {
426+
// The correct offset for start seems to be the range.start minus the wrapper
426427
start: doc.offsetAt((item as any).textEdit.range.start) - wrapper.length,
427428
length: doc.offsetAt((item as any).textEdit.range.end) - doc.offsetAt((item as any).textEdit.range.start),
428429
},

0 commit comments

Comments
 (0)