Skip to content

Commit

Permalink
Fixes #164716 (#172421)
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet authored Jan 25, 2023
1 parent 485b854 commit d81f0a4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export class SuggestWidgetPreviewModel extends BaseGhostTextWidgetModel {
new SuggestWidgetInlineCompletionProvider(
this.editor,
// Use the first cache item (if any) as preselection.
() => this.cache.value?.completions[0]?.toLiveInlineCompletion()
() => {
// We might get asked in a content change event before the cache has received that event.
this.cache.value?.updateRanges();
return this.cache.value?.completions[0]?.toLiveInlineCompletion();
}
)
);
private readonly updateOperation = this._register(new MutableDisposable<UpdateOperation>());
Expand Down

0 comments on commit d81f0a4

Please sign in to comment.