Skip to content

Commit e8540e6

Browse files
committed
Fix terminal find button state on reveal
Fixes microsoft#145805
1 parent 6e8b2dd commit e8540e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ export class TerminalFindWidget extends SimpleFindWidget {
4141
instance.xterm?.findNext(this.inputValue, { regex: this._getRegexValue(), wholeWord: this._getWholeWordValue(), caseSensitive: this._getCaseSensitiveValue() });
4242
}
4343
}
44+
4445
override reveal(initialInput?: string): void {
4546
const instance = this._terminalService.activeInstance;
4647
if (instance && this.inputValue && this.inputValue !== '') {
4748
// trigger highlight all matches
48-
instance.xterm?.findPrevious(this.inputValue, { incremental: true, regex: this._getRegexValue(), wholeWord: this._getWholeWordValue(), caseSensitive: this._getCaseSensitiveValue() });
49+
instance.xterm?.findPrevious(this.inputValue, { incremental: true, regex: this._getRegexValue(), wholeWord: this._getWholeWordValue(), caseSensitive: this._getCaseSensitiveValue() }).then(foundMatch => {
50+
this.updateButtons(foundMatch);
51+
});
4952
}
53+
this.updateButtons(false);
5054

5155
super.reveal(initialInput);
5256
this._findWidgetVisible.set(true);

0 commit comments

Comments
 (0)