mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 06:36:48 +02:00
SynEdit: Fixed/Workaround an issue with missing refresh (fold-line-mapping not updated), if no highlighter is assigned
git-svn-id: trunk@31852 -
This commit is contained in:
parent
70e64e04d8
commit
b61f745148
@ -4842,8 +4842,11 @@ begin
|
||||
exit;
|
||||
end;
|
||||
if not assigned(FHighlighter) then begin
|
||||
if ATextChanged then
|
||||
if ATextChanged then begin
|
||||
fMarkupManager.TextChanged(FChangedLinesStart, FChangedLinesEnd);
|
||||
// TODO: see TSynEditFoldedView.LineCountChanged, this is only needed, because NeedFixFrom does not always work
|
||||
FFoldedLinesView.FixFoldingAtTextIndex(FChangedLinesStart, FChangedLinesEnd);
|
||||
end;
|
||||
Topline := TopLine;
|
||||
exit;
|
||||
end;
|
||||
|
@ -3936,7 +3936,9 @@ procedure TSynEditFoldedView.LineCountChanged(Sender: TSynEditStrings; AIndex, A
|
||||
begin
|
||||
{$IFDEF SynFoldDebug}try DebugLnEnter(['>> FOLD-- LineCountChanged AIndex=', AIndex, ' Acount=',ACount]);{$ENDIF}
|
||||
// no need for fix folding => synedit will be called, and scanlines will call fixfolding
|
||||
{TODO: a "need fix folding" flag => to ensure it will be called if synedit doesnt}
|
||||
{TODO: a "need fix folding" flag => to ensure it will be called if synedit doesnt
|
||||
SynEdit.ScanRanges, calls Fixfolding as workaroound => review
|
||||
}
|
||||
if (fLockCount > 0) and (AIndex < max(fNeedFixFrom, fNeedFixMinEnd)) then begin
|
||||
// adapt the fixfold range. Could be done smarter, but it doesn't matter if the range gets bigger than needed.
|
||||
if (ACount < 0) and (AIndex < fNeedFixFrom) then inc(fNeedFixFrom, ACount);
|
||||
|
Loading…
Reference in New Issue
Block a user