From b89a4865d66ae4a5a002f98c3be9db5bc12efffc Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 17 Jan 2026 10:16:35 +1100 Subject: Hoist calculation of last style of line into function and simplify logic. --- src/PositionCache.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/PositionCache.cxx') diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 16bc10f5a..abe467f10 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -318,6 +318,10 @@ int LineLayout::EndLineStyle() const noexcept { return styles[std::max(numCharsBeforeEOL - 1, 0)]; } +int LineLayout::LastStyle() const noexcept { + return styles[numCharsInLine]; +} + void LineLayout::WrapLine(const Document *pdoc, Sci::Position posLineStart, Wrap wrapState, XYPOSITION wrapWidth) { // Document wants document positions but simpler to work in line positions // so take care of adding and subtracting line start in a lambda. -- cgit v1.2.3