mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 02:49:28 +02:00
SynEdit: Fix invalidation, when selecting bottom to top
git-svn-id: trunk@34936 -
This commit is contained in:
parent
151953196d
commit
8b3cf80474
@ -396,7 +396,7 @@ begin
|
||||
- TopLine + 2) * LineHeight);
|
||||
|
||||
{$IFDEF VerboseSynEditInvalidate}
|
||||
DebugLn(['TCustomSynEdit.InvalidateGutterLines ',DbgSName(self), ' FirstLine=',FirstTextLine, ' LastLine=',LastTextLine, ' rect=',dbgs(rcInval)]);
|
||||
DebugLn(['TCustomSynEdit.InvalidateTextLines ',DbgSName(self), ' FirstLine=',FirstTextLine, ' LastLine=',LastTextLine, ' rect=',dbgs(rcInval)]);
|
||||
{$ENDIF}
|
||||
if (rcInval.Top < rcInval.Bottom) and (rcInval.Left < rcInval.Right) then
|
||||
InvalidateRect(Handle, @rcInval, FALSE);
|
||||
|
@ -2478,6 +2478,9 @@ begin
|
||||
if FOldTopView <> TopView then
|
||||
FFoldedLinesView.TopLine := FOldTopView;
|
||||
|
||||
if (LastLine <> -1) and (LastLine < FirstLine) then
|
||||
SwapInt(FirstLine, LastLine);
|
||||
|
||||
FPaintArea.InvalidateGutterLines(FirstLine-1, LastLine-1);
|
||||
|
||||
FFoldedLinesView.TopLine := TopFoldLine;
|
||||
@ -2495,7 +2498,7 @@ begin
|
||||
if sfPainting in fStateFlags then exit;
|
||||
if Visible and HandleAllocated then begin
|
||||
{$IFDEF VerboseSynEditInvalidate}
|
||||
DebugLnEnter(['TCustomSynEdit.InvalidateTektLines ',DbgSName(self), ' FirstLine=',FirstLine, ' LastLine=',LastLine]);
|
||||
DebugLnEnter(['TCustomSynEdit.InvalidateTextLines ',DbgSName(self), ' FirstLine=',FirstLine, ' LastLine=',LastLine]);
|
||||
{$ENDIF}
|
||||
if (FirstLine = -1) and (LastLine = -1) then begin
|
||||
FPaintArea.InvalidateTextLines(-1, -1);
|
||||
@ -2505,6 +2508,9 @@ begin
|
||||
if FOldTopView <> TopView then
|
||||
FFoldedLinesView.TopLine := FOldTopView;
|
||||
|
||||
if (LastLine <> -1) and (LastLine < FirstLine) then
|
||||
SwapInt(FirstLine, LastLine);
|
||||
|
||||
FPaintArea.InvalidateTextLines(FirstLine-1, LastLine-1);
|
||||
|
||||
FFoldedLinesView.TopLine := TopFoldLine;
|
||||
|
Loading…
Reference in New Issue
Block a user