mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
Merge pull request #124972 from microsoft/hediet/fix-negative-overwriteAfter
Fixes #124742 by ensuring that overwriteAfter is not negative.
This commit is contained in:
commit
b1da1fbc8c
|
@ -151,6 +151,9 @@ function getInlineCompletion(suggestController: SuggestController, position: Pos
|
|||
const info = suggestController.getOverwriteInfo(item, false);
|
||||
return {
|
||||
text: insertText,
|
||||
range: Range.fromPositions(position.delta(0, -info.overwriteBefore), position.delta(0, info.overwriteAfter)),
|
||||
range: Range.fromPositions(
|
||||
position.delta(0, -info.overwriteBefore),
|
||||
position.delta(0, Math.max(info.overwriteAfter, 0))
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue