SynEdit: Ifdef Markup: fix crash when open shared synedit

git-svn-id: trunk@41437 -
This commit is contained in:
martin 2013-05-27 22:42:59 +00:00
parent 62106a6be3
commit b40fb20f03

View File

@ -3028,6 +3028,9 @@ begin
LastLine := ScreenRowToRow(LinesInWindow+1);
FAdjustedTop := ToIdx(TopLine);
Highlighter.CurrentLines := Lines;
if Highlighter.NeedScan then DebugLn('******** Highlighter.NeedScan ************');
Highlighter.ScanRanges;
if FMarkupNodes.HasEnabledMarkup then
while (FAdjustedTop > 0) and Highlighter.IsLineStartingInDirective(FAdjustedTop) and
@ -3350,6 +3353,7 @@ begin
exit;
end;
Highlighter.CurrentLines := Lines;
LastLine := ScreenRowToRow(LinesInWindow+1);
if (FLastValidTopLine <= TopLine) and (FLastValidLastLine >= LastLine) and
(FLastValidTreeStep = FIfDefTree.ChangeStep)