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)
(cherry picked from commit 1ee7a6b2b8)
This commit is contained in:
parent
c9ef3e431a
commit
edc41b641c
1 changed files with 8 additions and 5 deletions
|
|
@ -2827,7 +2827,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;
|
||||
|
|
@ -3414,11 +3414,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