Browse Source

Restore previous behavior of draw full line selection

Margers 10 months ago
parent
commit
405484df91
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/ide/weditor.pas

+ 2 - 3
packages/ide/weditor.pas

@@ -3905,9 +3905,8 @@ begin
           MoveChar(B,' ',Color,Size.X);
           MoveChar(B,' ',Color,Size.X);
           GetDisplayTextFormat(AY,LineText,Format);
           GetDisplayTextFormat(AY,LineText,Format);
 
 
-      {    if FlagSet(efSyntaxHighlight) then MaxX:=length(LineText)+1
-             else }MaxX:=Size.X+Delta.X;
-          for X:=1 to Min(MaxX,Length(LineText)) do
+          MaxX:=Min(Delta.X+1+Size.X,MaxLineLength);
+          for X:=(MaxX-Size.X) to MaxX+1 do
           begin
           begin
             AX:=Delta.X+X-1;
             AX:=Delta.X+X-1;
             if X<=length(LineText) then C:=LineText[X] else C:=' ';
             if X<=length(LineText) then C:=LineText[X] else C:=' ';