Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 7d1a254

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fixes/1666-filter-pr-solution-explorer
2 parents 68db33c + efe148d commit 7d1a254

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/GitHub.VisualStudio/UI/GitHubPane.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,13 @@ void UpdateSearchHost(bool enabled, string query)
169169
{
170170
SearchHost.IsEnabled = enabled;
171171

172-
if (SearchHost.SearchQuery?.SearchString != query)
172+
var searchString = SearchHost.SearchQuery?.SearchString;
173+
if (searchString?.Trim() != query?.Trim())
173174
{
175+
// SearchAsync will crash the process if we send it a duplicate string.
176+
// There is a SearchTrimsWhitespace setting that makes searched with leading or trailing
177+
// white-space appear as duplicates. We compare the query with trimmed white-space to avoid this.
178+
// https://github.com/github/VisualStudio/issues/1948
174179
SearchHost.SearchAsync(query != null ? new SearchQuery(query) : null);
175180
}
176181
}

0 commit comments

Comments
 (0)