diff options
author | Zufu Liu <unknown> | 2021-10-24 21:05:52 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2021-10-24 21:05:52 +1100 |
commit | 83b67c1d70ac48dd242e7a7d6d248e26cddc69e4 (patch) | |
tree | 5e89ea486d175e77bc00a902d97e1c0f664feb40 /src/PositionCache.cxx | |
parent | 42c72b79878ae99c45532e46f12642b4e21affee (diff) | |
download | scintilla-mirror-83b67c1d70ac48dd242e7a7d6d248e26cddc69e4.tar.gz |
Avoid extra breaks introduced by revision 8993.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 587ffdd3b..bedc843df 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -662,7 +662,7 @@ void BreakFinder::Insert(Sci::Position val) { } BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, Sci::Position posLineStart_, - XYPOSITION xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) : + XYPOSITION xStart, BreakFor breakFor, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) : ll(ll_), lineRange(lineRange_), posLineStart(posLineStart_), @@ -683,7 +683,7 @@ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lin nextBreak--; } - if (breakForSelection) { + if (FlagSet(breakFor, BreakFor::Selection)) { const SelectionPosition posStart(posLineStart); const SelectionPosition posEnd(posLineStart + lineRange.end); const SelectionSegment segmentLine(posStart, posEnd); @@ -699,7 +699,7 @@ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lin // On the curses platform, the terminal is drawing its own caret, so add breaks around the // caret in the main selection in order to help prevent the selection from being drawn in // the caret's cell. - if (pvsDraw && FlagSet(pvsDraw->caret.style, CaretStyle::Curses) && !psel->RangeMain().Empty()) { + if (FlagSet(pvsDraw->caret.style, CaretStyle::Curses) && !psel->RangeMain().Empty()) { const Sci::Position caretPos = psel->RangeMain().caret.Position(); const Sci::Position anchorPos = psel->RangeMain().anchor.Position(); if (caretPos < anchorPos) { @@ -712,7 +712,7 @@ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lin } } } - if (pvsDraw && pvsDraw->indicatorsSetFore) { + if (FlagSet(breakFor, BreakFor::Foreground) && pvsDraw->indicatorsSetFore) { for (const IDecoration *deco : pdoc->decorations->View()) { if (pvsDraw->indicators[deco->Indicator()].OverridesTextFore()) { Sci::Position startPos = deco->EndRun(posLineStart); |