diff options
| author | Neil <nyamatongwe@gmail.com> | 2026-04-13 11:31:36 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2026-04-13 11:31:36 +1000 |
| commit | 4db72474ccc799b6f39bb37604154cbcf33e08be (patch) | |
| tree | 6b9f00c323fb287b1f00bb27d2e5e581d9a2d9e2 /src/EditView.cxx | |
| parent | 59d707bee0292d434513b28bcbfa7257c56a910c (diff) | |
| download | scintilla-mirror-4db72474ccc799b6f39bb37604154cbcf33e08be.tar.gz | |
Copy AnyOf from Lexilla to clarify code checking if a value is in a set.
Diffstat (limited to 'src/EditView.cxx')
| -rw-r--r-- | src/EditView.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index d1e9c4103..154954c70 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1347,7 +1347,7 @@ void EditView::DrawEOLAnnotationText(Surface *surface, const EditModel &model, c namespace { constexpr bool AnnotationBoxedOrIndented(AnnotationVisible annotationVisible) noexcept { - return annotationVisible == AnnotationVisible::Boxed || annotationVisible == AnnotationVisible::Indented; + return AnyOf(annotationVisible, AnnotationVisible::Boxed, AnnotationVisible::Indented); } } @@ -2317,7 +2317,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi void EditView::DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, Sci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Line lineVisible) { - if ((vsDraw.viewIndentationGuides == IndentView::LookForward || vsDraw.viewIndentationGuides == IndentView::LookBoth) + if (AnyOf(vsDraw.viewIndentationGuides, IndentView::LookForward, IndentView::LookBoth) && (subLine == 0)) { const Sci::Position posLineStart = model.pdoc->LineStart(line); int indentSpace = model.pdoc->GetLineIndentation(line); @@ -2711,7 +2711,7 @@ Sci::Position EditView::FormatRange(bool draw, CharacterRangeFull chrg, Rectangl } else if (colourMode == PrintOption::BlackOnWhite) { it->fore = black; it->back = white; - } else if (colourMode == PrintOption::ColourOnWhite || colourMode == PrintOption::ColourOnWhiteDefaultBG) { + } else if (AnyOf(colourMode, PrintOption::ColourOnWhite, PrintOption::ColourOnWhiteDefaultBG)) { it->back = white; } } |
