aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2026-01-17 10:16:35 +1100
committerNeil <nyamatongwe@gmail.com>2026-01-17 10:16:35 +1100
commitb89a4865d66ae4a5a002f98c3be9db5bc12efffc (patch)
treec36e5996e234ccd4231addd4a30d5833867a7f74 /src/PositionCache.cxx
parentd718aef662efafad72d5880def81641f80db99a9 (diff)
downloadscintilla-mirror-b89a4865d66ae4a5a002f98c3be9db5bc12efffc.tar.gz
Hoist calculation of last style of line into function and simplify logic.master
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r--src/PositionCache.cxx4
1 files changed, 4 insertions, 0 deletions
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.