diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 12 | ||||
| -rw-r--r-- | src/MarginView.cxx | 13 |
2 files changed, 20 insertions, 5 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 8d090f5fa..444d0f2ac 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -568,6 +568,18 @@ Released 27 July 2020. </li> <li> + Fix position of marker symbols for SC_MARGIN_RTEXT which were being moved based on + width of text. + </li> + </ul> + <h3> + <a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.21.0/scintilla3210.zip/download">Release 3.21.0</a> + </h3> + <ul> + <li> + Released 27 July 2020. + </li> + <li> Constants in Scintilla.h can be disabled with SCI_DISABLE_AUTOGENERATED. </li> <li> diff --git a/src/MarginView.cxx b/src/MarginView.cxx index f0a3559f4..a742bdc4b 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -364,9 +364,11 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, marks &= vs.ms[margin].mask; - PRectangle rcMarker = rcSelMargin; - rcMarker.top = static_cast<XYPOSITION>(yposScreen); - rcMarker.bottom = static_cast<XYPOSITION>(yposScreen + vs.lineHeight); + PRectangle rcMarker( + rcSelMargin.left, + static_cast<XYPOSITION>(yposScreen), + rcSelMargin.right, + static_cast<XYPOSITION>(yposScreen + vs.lineHeight)); if (vs.ms[margin].style == SC_MARGIN_NUMBER) { if (firstSubLine) { std::string sNumber; @@ -412,11 +414,12 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc, if (firstSubLine) { surface->FillRectangle(rcMarker, vs.styles[stMargin.StyleAt(0) + vs.marginStyleOffset].back); + PRectangle rcText = rcMarker; if (vs.ms[margin].style == SC_MARGIN_RTEXT) { const int width = WidestLineWidth(surface, vs, vs.marginStyleOffset, stMargin); - rcMarker.left = rcMarker.right - width - 3; + rcText.left = rcText.right - width - 3; } - DrawStyledText(surface, vs, vs.marginStyleOffset, rcMarker, + DrawStyledText(surface, vs, vs.marginStyleOffset, rcText, stMargin, 0, stMargin.length, drawAll); } else { // if we're displaying annotation lines, colour the margin to match the associated document line |
