diff options
author | Zufu Liu <unknown> | 2023-11-24 09:01:05 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2023-11-24 09:01:05 +1100 |
commit | 0d84ef7da391ff193c944cb47b7a4eddeb61d8c3 (patch) | |
tree | fd24e0efe2435e97189210847aab2e32d7be36d8 /src/EditView.cxx | |
parent | c9668d46c7209e8f1f86a109e9c41aac07232492 (diff) | |
download | scintilla-mirror-0d84ef7da391ff193c944cb47b7a4eddeb61d8c3.tar.gz |
Feature [feature-requests:#1502] Simplify FlagSet expressions.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 0e136a8bf..a4fd701a7 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -2060,17 +2060,11 @@ void DrawFoldLines(Surface *surface, const EditModel &model, const ViewStyle &vs const ColourRGBA foldLineColour = vsDraw.ElementColour(Element::FoldLine).value_or( vsDraw.styles[StyleDefault].fore); // Paint the line above the fold - if ((subLine == 0) && - ((expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeExpanded))) - || - (!expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeContracted))))) { + if ((subLine == 0) && FlagSet(model.foldFlags, (expanded ? FoldFlag::LineBeforeExpanded: FoldFlag::LineBeforeContracted))) { surface->FillRectangleAligned(Side(rcLine, Edge::top, 1.0), foldLineColour); } // Paint the line below the fold - if (lastSubLine && - ((expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterExpanded))) - || - (!expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterContracted))))) { + if (lastSubLine && FlagSet(model.foldFlags, (expanded ? FoldFlag::LineAfterExpanded : FoldFlag::LineAfterContracted))) { surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), foldLineColour); // If contracted fold line drawn then don't overwrite with hidden line // as fold lines are more specific then hidden lines. |