mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 07:19:18 +02:00
SynEdit: Markup fold color, fix empty lines before "last line close", part of patch 20 from issue #30421 by Pascal R.
git-svn-id: trunk@54153 -
This commit is contained in:
parent
db9e91ddf7
commit
21853b8fc0
@ -439,18 +439,23 @@ var
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetFoldColorInfosCount(FFoldColorInfosCount + 1);
|
|
||||||
with FFoldColorInfos[FFoldColorInfosCount - 1] do begin
|
// ignore implicit close nodes at end of line, especially if line is empty
|
||||||
Border := False;
|
// or at least has less characters as vertical line is on
|
||||||
SrcNode:= ANode; //needed by close node
|
if not(sfaCloseForNextLine in ANode.FoldAction) then begin
|
||||||
Y := ANode.LineIndex + 1;
|
SetFoldColorInfosCount(FFoldColorInfosCount + 1);
|
||||||
X := ANode.LogXStart + 1;
|
with FFoldColorInfos[FFoldColorInfosCount - 1] do begin
|
||||||
X2 := ANode.LogXEnd + 1;
|
Border := False;
|
||||||
Level := lvl;
|
SrcNode:= ANode; //needed by close node
|
||||||
if not (sfaOutlineNocolor in ANode.FoldAction) then
|
Y := ANode.LineIndex + 1;
|
||||||
ColorIdx := Max(0, lvl) mod (length(Colors))
|
X := ANode.LogXStart + 1;
|
||||||
else
|
X2 := ANode.LogXEnd + 1;
|
||||||
ColorIdx := -1;
|
Level := lvl;
|
||||||
|
if not (sfaOutlineNocolor in ANode.FoldAction) then
|
||||||
|
ColorIdx := Max(0, lvl) mod (length(Colors))
|
||||||
|
else
|
||||||
|
ColorIdx := -1;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user