Skip to content

Commit

Permalink
Wait for next command prompt before creating decoration marker
Browse files Browse the repository at this point in the history
Fixes #195496
  • Loading branch information
Tyriar committed Oct 12, 2023
1 parent b183367 commit 443f8cc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ export class TerminalQuickFixAddon extends Disposable implements ITerminalAddon,
if (command.command !== '' && this._lastQuickFixId) {
this._disposeQuickFix(this._lastQuickFixId, false);
}


// Wait for the next command to start to ensure the quick fix marker is created on the next
// prompt line
const commandDetection = this._capabilities.get(TerminalCapability.CommandDetection);
if (commandDetection) {
await Event.toPromise(commandDetection.onCommandStarted);
}

const resolver = async (selector: ITerminalQuickFixOptions, lines?: string[]) => {
if (lines === undefined) {
return undefined;
Expand Down

0 comments on commit 443f8cc

Please sign in to comment.