File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -2056,7 +2056,31 @@ private void UpdateCurrentRevisionFilesForSearchSuggestion()
20562056 Task . Run ( ( ) =>
20572057 {
20582058 var files = new Commands . QueryCurrentRevisionFiles ( _fullpath ) . Result ( ) ;
2059- Dispatcher . UIThread . Invoke ( ( ) => _revisionFiles . AddRange ( files ) ) ;
2059+ Dispatcher . UIThread . Invoke ( ( ) =>
2060+ {
2061+ if ( _searchCommitFilterType != 3 )
2062+ return ;
2063+
2064+ _revisionFiles . AddRange ( files ) ;
2065+
2066+ if ( ! string . IsNullOrEmpty ( _searchCommitFilter ) && _searchCommitFilter . Length > 2 && _revisionFiles . Count > 0 )
2067+ {
2068+ var suggestion = new List < string > ( ) ;
2069+ foreach ( var file in _revisionFiles )
2070+ {
2071+ if ( file . Contains ( _searchCommitFilter , StringComparison . OrdinalIgnoreCase ) && file . Length != _searchCommitFilter . Length )
2072+ {
2073+ suggestion . Add ( file ) ;
2074+ if ( suggestion . Count > 100 )
2075+ break ;
2076+ }
2077+ }
2078+
2079+ SearchCommitFilterSuggestion . Clear ( ) ;
2080+ SearchCommitFilterSuggestion . AddRange ( suggestion ) ;
2081+ IsSearchCommitSuggestionOpen = SearchCommitFilterSuggestion . Count > 0 ;
2082+ }
2083+ } ) ;
20602084 } ) ;
20612085 }
20622086 }
You can’t perform that action at this time.
0 commit comments