diff options
-rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
-rw-r--r-- | src/EditView.cxx | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 2d195d142..52bc2d610 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -590,6 +590,9 @@ Fix overlapping of text with line end wrap marker. <a href="https://sourceforge.net/p/scintilla/bugs/2378/">Bug #2378</a>. </li> + <li> + Fix clipping of line end wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT. + </li> </ul> <h3> <a href="https://www.scintilla.org/scintilla533.zip">Release 5.3.3</a> diff --git a/src/EditView.cxx b/src/EditView.cxx index 3ba1ee4e5..f93303f6c 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1121,14 +1121,15 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle if (drawWrapMarkEnd) { PRectangle rcPlace = rcSegment; + const XYPOSITION maxLeft = rcPlace.right - vsDraw.aveCharWidth; if (FlagSet(vsDraw.wrap.visualFlagsLocation, WrapVisualLocation::EndByText)) { - rcPlace.left = xEol + xStart + virtualSpace; + rcPlace.left = std::min(xEol + xStart + virtualSpace, maxLeft); rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; } else { // rcLine is clipped to text area rcPlace.right = rcLine.right; - rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; + rcPlace.left = maxLeft; } if (!customDrawWrapMarker) { DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); |