Skip to content

Commit d403470

Browse files
committed
ignore search calls from SB when it's closed/closing
1 parent 931aed5 commit d403470

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cascadia/TerminalControl/TermControl.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
600600
const bool caseSensitive,
601601
const bool regularExpression)
602602
{
603-
_handleSearchResults(_core.Search(text, goForward, caseSensitive, regularExpression, false));
603+
if (_searchBox && _searchBox->IsOpen())
604+
{
605+
_handleSearchResults(_core.Search(text, goForward, caseSensitive, regularExpression, false));
606+
}
604607
}
605608

606609
// Method Description:

0 commit comments

Comments
 (0)