FIX: Don't reset cursor position after delete in search results

This commit is contained in:
Alexander Koblov 2020-02-17 17:14:29 +00:00
commit da7347bc43
2 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ end;
function TSearchResultFileSource.GetProperties: TFileSourceProperties;
begin
Result := inherited GetProperties + [fspLinksToLocalFiles] - [fspNoneParent];
Result := inherited GetProperties + [fspLinksToLocalFiles] - [fspNoneParent, fspListFlatView];
end;
function TSearchResultFileSource.SetCurrentWorkingDirectory(NewDir: String): Boolean;

View file

@ -879,10 +879,10 @@ begin
end;
if (FLastActiveFileIndex > -1) then
begin
if IsInPath(CurrentPath, LastActiveFile, False, False) then
if FlatView or IsInPath(CurrentPath, LastActiveFile, False, False) then
begin
if (PathIsAbsolute and mbCompareFileNames(LastActiveFile, aFilePath)) or
(mbCompareFileNames(LastActiveFile, CurrentPath + aFilePath)) then
(FlatView) or (mbCompareFileNames(LastActiveFile, CurrentPath + aFilePath)) then
begin
if FLastActiveFileIndex < FFiles.Count then
SetUpdate(FLastActiveFileIndex)