mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Search in Viewer (patch by GrayElf)
This commit is contained in:
parent
88d355efde
commit
3d7feddba2
1 changed files with 3 additions and 3 deletions
|
|
@ -2066,7 +2066,7 @@ begin
|
|||
if bTextFound then FLastSearchPos := PAnsiAddr - ViewerControl.GetDataAdr;
|
||||
end
|
||||
// Using very slow search algorithm
|
||||
else if (ViewerControl.Encoding in ViewerEncodingMultiByte) then
|
||||
else if (ViewerControl.Encoding in ViewerEncodingMultiByte) or bSearchBackwards then
|
||||
begin
|
||||
PAdr := ViewerControl.FindUtf8Text(FLastSearchPos, sSearchTextU,
|
||||
FFindDialog.cbCaseSens.Checked,
|
||||
|
|
@ -2078,9 +2078,9 @@ begin
|
|||
else begin
|
||||
RecodeTable:= InitRecodeTable(ViewerControl.EncodingName, FFindDialog.cbCaseSens.Checked);
|
||||
PAdr := PosMemBoyerMur(ViewerControl.GetDataAdr + FLastSearchPos,
|
||||
ViewerControl.FileSize, sSearchTextA, RecodeTable);
|
||||
ViewerControl.FileSize - FLastSearchPos, sSearchTextA, RecodeTable);
|
||||
bTextFound := (PAdr <> PtrInt(-1));
|
||||
if bTextFound then FLastSearchPos := PAdr;
|
||||
if bTextFound then FLastSearchPos := PAdr + FLastSearchPos;
|
||||
end;
|
||||
|
||||
if bTextFound then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue