diff options
author | Zufu Liu <unknown> | 2025-06-17 13:20:11 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2025-06-17 13:20:11 +1000 |
commit | b1dcfa8dc328644f2a68c5168130b9e66a842427 (patch) | |
tree | 5cd3df229e47c773b078c5404a4247ddab13f238 /src | |
parent | 54ff6ee4087b74dd3c075f2cac6100f0542c87dd (diff) | |
download | scintilla-mirror-b1dcfa8dc328644f2a68c5168130b9e66a842427.tar.gz |
Feature [feature-requests:#1557]. Shorten expression.
Diffstat (limited to 'src')
-rw-r--r-- | src/PositionCache.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 1f3a803fc..d0fb6acf7 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -317,7 +317,7 @@ Interval LineLayout::SpanByte(int index) const noexcept { } int LineLayout::EndLineStyle() const noexcept { - return styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0]; + return styles[std::max(numCharsBeforeEOL - 1, 0)]; } void LineLayout::WrapLine(const Document *pdoc, Sci::Position posLineStart, Wrap wrapState, XYPOSITION wrapWidth) { |