fix: file suggestion popup did not show while searching commit by file path

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-11 19:52:50 +08:00
parent 471452646b
commit 2fc03025ee
No known key found for this signature in database

View file

@ -321,7 +321,7 @@ namespace SourceGit.ViewModels
set set
{ {
if (SetProperty(ref _searchCommitFilter, value) && if (SetProperty(ref _searchCommitFilter, value) &&
_searchCommitFilterType == 3 && _searchCommitFilterType == 4 &&
!string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(value) &&
value.Length >= 2 && value.Length >= 2 &&
_revisionFiles.Count > 0) _revisionFiles.Count > 0)
@ -2395,14 +2395,14 @@ namespace SourceGit.ViewModels
{ {
_revisionFiles.Clear(); _revisionFiles.Clear();
if (_searchCommitFilterType == 3) if (_searchCommitFilterType == 4)
{ {
Task.Run(() => Task.Run(() =>
{ {
var files = new Commands.QueryRevisionFileNames(_fullpath, "HEAD").Result(); var files = new Commands.QueryRevisionFileNames(_fullpath, "HEAD").Result();
Dispatcher.UIThread.Invoke(() => Dispatcher.UIThread.Invoke(() =>
{ {
if (_searchCommitFilterType != 3) if (_searchCommitFilterType != 4)
return; return;
_revisionFiles.AddRange(files); _revisionFiles.AddRange(files);