diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-22 09:25:50 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-22 09:25:50 +1000 |
commit | ee1886079d0a5cd350ee8e3379be347943ba93ae (patch) | |
tree | 105ef0a0c7a9540ce2a3f90fa7d47fe9334d58c5 /src/MarginView.cxx | |
parent | c8235ba0e0292f209a8233613669e2cff8de80da (diff) | |
download | scintilla-mirror-ee1886079d0a5cd350ee8e3379be347943ba93ae.tar.gz |
Encapsulate whether a margin shows folding.
Diffstat (limited to 'src/MarginView.cxx')
-rw-r--r-- | src/MarginView.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/MarginView.cxx b/src/MarginView.cxx index 0c2910a03..68c599b1f 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -187,7 +187,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; if (vs.ms[margin].style != SC_MARGIN_NUMBER) { - if (vs.ms[margin].mask & SC_MASK_FOLDERS) { + if (vs.ms[margin].ShowsFolding()) { // Required because of special way brush is created for selection margin // Ensure patterns line up when scrolling with separate margin view // by choosing correctly aligned variant. @@ -223,7 +223,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, // lessening of fold level which implies a 'fold tail' but which should not // be displayed until the last of a sequence of whitespace. bool needWhiteClosure = false; - if (vs.ms[margin].mask & SC_MASK_FOLDERS) { + if (vs.ms[margin].ShowsFolding()) { const int level = model.pdoc->GetLevel(model.pcs->DocFromDisplay(visibleLine)); if (LevelIsWhitespace(level)) { Sci::Line lineBack = model.pcs->DocFromDisplay(visibleLine); @@ -266,7 +266,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, bool headWithTail = false; - if (vs.ms[margin].mask & SC_MASK_FOLDERS) { + if (vs.ms[margin].ShowsFolding()) { // Decide which fold indicator should be displayed const int level = model.pdoc->GetLevel(lineDoc); const int levelNext = model.pdoc->GetLevel(lineDoc + 1); @@ -428,7 +428,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, for (int markBit = 0; (markBit < 32) && marks; markBit++) { if (marks & 1) { LineMarker::FoldPart part = LineMarker::FoldPart::undefined; - if ((vs.ms[margin].mask & SC_MASK_FOLDERS) && highlightDelimiter.IsFoldBlockHighlighted(lineDoc)) { + if (vs.ms[margin].ShowsFolding() && highlightDelimiter.IsFoldBlockHighlighted(lineDoc)) { if (highlightDelimiter.IsBodyOfFoldBlock(lineDoc)) { part = LineMarker::FoldPart::body; } else if (highlightDelimiter.IsHeadOfFoldBlock(lineDoc)) { |