pass in prefix vs value to completion extension providers so command line excludes ghost text (#236000)

fixes #235996
pull/236083/head
Megan Rogge 2024-12-13 10:57:53 -06:00 committed by GitHub
parent e7b43262d2
commit 2468418bd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ export class SuggestAddon extends Disposable implements ITerminalAddon, ISuggest
await this._extensionService.activateByEvent('onTerminalCompletionsRequested');
}
const providedCompletions = await this._terminalCompletionService.provideCompletions(this._promptInputModel.value, this._promptInputModel.cursorIndex, this._shellType, token, triggerCharacter, doNotRequestExtensionCompletions);
const providedCompletions = await this._terminalCompletionService.provideCompletions(this._promptInputModel.prefix, this._promptInputModel.cursorIndex, this._shellType, token, triggerCharacter, doNotRequestExtensionCompletions);
if (!providedCompletions?.length || token.isCancellationRequested) {
return;
}