mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Quicksearch working wrong with columns headers disabled [bug 2870784].
This commit is contained in:
parent
4b68bf4b10
commit
7bfc0ac808
1 changed files with 8 additions and 8 deletions
|
|
@ -1521,40 +1521,40 @@ begin
|
|||
if fSearchDirect then
|
||||
begin
|
||||
if fNext then
|
||||
I := edtSearch.Tag + 1; // begin search from next file
|
||||
I := I + 1; // begin search from next file
|
||||
iEnd := dgPanel.RowCount;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if fPrevious then
|
||||
I := edtSearch.Tag - 1; // begin search from previous file
|
||||
iEnd := dgPanel.FixedRows;
|
||||
I := I - 1; // begin search from previous file
|
||||
iEnd := dgPanel.FixedRows - 1;
|
||||
end;
|
||||
if I < 1 then I := 1;
|
||||
|
||||
try
|
||||
while I <> iEnd do
|
||||
begin
|
||||
Result := MatchesMask(AnsiLowerCase(FFiles[I-1].TheFile.Name), sSearchName);
|
||||
Result := MatchesMask(AnsiLowerCase(FFiles[I - dgPanel.FixedRows].TheFile.Name), sSearchName);
|
||||
|
||||
if Result then
|
||||
begin
|
||||
dgPanel.Row := I;
|
||||
MakeVisible(I);
|
||||
edtSearch.Tag := I;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if fSearchDirect then
|
||||
Inc(I)
|
||||
else
|
||||
Dec(I);
|
||||
|
||||
// if not Next or Previous then search from beginning of list
|
||||
// to cursor position
|
||||
if (not(fNext or fPrevious)) and (I = iEnd) then
|
||||
begin
|
||||
I := 1;
|
||||
I := dgPanel.FixedRows;
|
||||
iEnd := iPos;
|
||||
iPos := 1;
|
||||
iPos := I;
|
||||
end;
|
||||
end; // while
|
||||
except
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue