Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Sep 21, 2024
1 parent 5cf906c commit 7f6fa6d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions atsynedit/atsynedit_sel.inc
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ begin

Y:= YMin+1;
repeat
LineCoord2:= ClientPosToCaretPos(ATPoint(Coord2.X, Y), Details);

{
ClientPosToCaretPos gives CudaText issue #5697. problem is visible like this:
- file with very long lines + short lines
Expand All @@ -516,11 +518,10 @@ begin
- unpress the mouse
-> those short lines have BAD selected parts
}
LineCoord1:= ClientPosToCaretPos(ATPoint(Coord1.X, Y), Details);
//workaround for the above, it is much easier to do than to improve ClientPosToCaretPos:
//LineCoord1:= ClientPosToCaretPos(ATPoint(Coord1.X, Y), Details);
// workaround for the above:
LineCoord1.X:= ACaretPos1.X;

LineCoord2:= ClientPosToCaretPos(ATPoint(Coord2.X, Y), Details);
LineCoord1.Y:= LineCoord2.Y;

NPosX:= LineCoord2.X;
NPosY:= LineCoord2.Y;
Expand Down

0 comments on commit 7f6fa6d

Please sign in to comment.