mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Viewer - Incorrect selection offset after search in Text mode (issue #1755)
This commit is contained in:
parent
fcca7ac789
commit
1ee7a6b2b8
1 changed files with 8 additions and 5 deletions
|
|
@ -2903,7 +2903,7 @@ var
|
|||
Inc(len); // Assume there is one character after conversion
|
||||
// (otherwise use Inc(len, UTF8Length(s))).
|
||||
|
||||
if len <= FHPosition then
|
||||
if (Mode = vcmText) and (len <= FHPosition) then
|
||||
begin
|
||||
i := i + CharLenInBytes;
|
||||
Continue;
|
||||
|
|
@ -3490,11 +3490,14 @@ begin
|
|||
|
||||
Update;
|
||||
|
||||
if (FVisibleOffset < FHPosition) or
|
||||
(FVisibleOffset > FHPosition + FTextWidth) then
|
||||
if FViewerControlMode = vcmText then
|
||||
begin
|
||||
SetHPosition(FVisibleOffset);
|
||||
HScroll(-1);
|
||||
if (FVisibleOffset < FHPosition) or
|
||||
(FVisibleOffset > FHPosition + FTextWidth) then
|
||||
begin
|
||||
SetHPosition(FVisibleOffset);
|
||||
HScroll(-1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue