mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 01:19:29 +02:00
SynEdit: Avoid highlighter scanning twice, due to trailing space changes
git-svn-id: trunk@43159 -
This commit is contained in:
parent
3bc8a27299
commit
ecdeadf98c
@ -2233,6 +2233,12 @@ begin
|
|||||||
FUndoBlockAtPaintLock := 0;
|
FUndoBlockAtPaintLock := 0;
|
||||||
EndUndoBlock{$IFDEF SynUndoDebugBeginEnd}('TCustomSynEdit.DoDecPaintLock'){$ENDIF};
|
EndUndoBlock{$IFDEF SynUndoDebugBeginEnd}('TCustomSynEdit.DoDecPaintLock'){$ENDIF};
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
FCaret.Unlock; // Maybe after FFoldedLinesView
|
||||||
|
FBlockSelection.Unlock;
|
||||||
|
// FTrimmedLinesView sets the highlighter to modified. Until fixed, must be done before ScanRanges
|
||||||
|
FTrimmedLinesView.UnLock; // Must be unlocked after caret // May Change lines
|
||||||
|
|
||||||
if (FPaintLock=1) and HandleAllocated then begin
|
if (FPaintLock=1) and HandleAllocated then begin
|
||||||
ScanRanges(FLastTextChangeStamp <> TSynEditStringList(FLines).TextChangeStamp);
|
ScanRanges(FLastTextChangeStamp <> TSynEditStringList(FLines).TextChangeStamp);
|
||||||
if sfAfterLoadFromFileNeeded in fStateFlags then
|
if sfAfterLoadFromFileNeeded in fStateFlags then
|
||||||
@ -2245,10 +2251,10 @@ begin
|
|||||||
FChangedLinesEnd:=0;
|
FChangedLinesEnd:=0;
|
||||||
FChangedLinesDiff:=0;
|
FChangedLinesDiff:=0;
|
||||||
end;
|
end;
|
||||||
FCaret.Unlock; // Maybe after FFoldedLinesView
|
|
||||||
FBlockSelection.Unlock;
|
// When fixed FCaret, FBlockSelection, FTrimmedLinesView can move here
|
||||||
FTrimmedLinesView.UnLock; // Must be unlocked after caret // May Change lines
|
|
||||||
FFoldedLinesView.UnLock; // after ScanFrom, but before UpdateCaret
|
FFoldedLinesView.UnLock; // after ScanFrom, but before UpdateCaret
|
||||||
|
|
||||||
Dec(FPaintLock);
|
Dec(FPaintLock);
|
||||||
if (FPaintLock = 0) and HandleAllocated then begin
|
if (FPaintLock = 0) and HandleAllocated then begin
|
||||||
ScrollAfterTopLineChanged;
|
ScrollAfterTopLineChanged;
|
||||||
|
Loading…
Reference in New Issue
Block a user