SynEdit: partly fix unfolding lines with mixed collapse and expand info

git-svn-id: trunk@65027 -
This commit is contained in:
martin 2021-04-20 13:55:52 +00:00
parent f71e02adf7
commit 0340add854

View File

@ -461,8 +461,11 @@ begin
ScrLine := ToIdx(AnInfo.NewCaret.ViewedLinePos) - ToIdx(GutterArea.TextArea.TopLine);
// TODO: Keepvisible is incorrect, if the line can fold AND unfold, and the action does not match the symbol
KeepVisible := 1;
if FoldTypeForLine(ScrLine) = cfHideStart then KeepVisible := 0;
if (FoldTypeForLine(ScrLine) = cfHideStart) and (ACommand <> emcCodeFoldExpand) then
KeepVisible := 0;
if (FoldTypeForLine(ScrLine) = cfCollapsedHide) then begin
if IsFoldHidePreviousLine(ScrLine) then