mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 12:36:15 +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;
|
||||
EndUndoBlock{$IFDEF SynUndoDebugBeginEnd}('TCustomSynEdit.DoDecPaintLock'){$ENDIF};
|
||||
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
|
||||
ScanRanges(FLastTextChangeStamp <> TSynEditStringList(FLines).TextChangeStamp);
|
||||
if sfAfterLoadFromFileNeeded in fStateFlags then
|
||||
@ -2245,10 +2251,10 @@ begin
|
||||
FChangedLinesEnd:=0;
|
||||
FChangedLinesDiff:=0;
|
||||
end;
|
||||
FCaret.Unlock; // Maybe after FFoldedLinesView
|
||||
FBlockSelection.Unlock;
|
||||
FTrimmedLinesView.UnLock; // Must be unlocked after caret // May Change lines
|
||||
|
||||
// When fixed FCaret, FBlockSelection, FTrimmedLinesView can move here
|
||||
FFoldedLinesView.UnLock; // after ScanFrom, but before UpdateCaret
|
||||
|
||||
Dec(FPaintLock);
|
||||
if (FPaintLock = 0) and HandleAllocated then begin
|
||||
ScrollAfterTopLineChanged;
|
||||
|
Loading…
Reference in New Issue
Block a user