aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html5
-rw-r--r--src/EditView.cxx4
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index b117e90ba..0c7885d21 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -569,6 +569,7 @@
</tr><tr>
<td>Arkadiusz Michalski</td>
<td>Christian Schmitz</td>
+ <td>Michael Berlenz</td>
</tr>
</table>
<h2>Releases</h2>
@@ -583,6 +584,10 @@
Fix crash with unexpected right-to-left text on GTK.
<a href="https://sourceforge.net/p/scintilla/bugs/2309/">Bug #2309</a>.
</li>
+ <li>
+ Fix position of end-of-line annotation when fold display text is visible.
+ <a href="https://sourceforge.net/p/scintilla/bugs/2320/">Bug #2320</a>.
+ </li>
</ul>
<h3>
<a href="https://www.scintilla.org/scintilla521.zip">Release 5.2.1</a>
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 961c54332..d4ab63948 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -1485,7 +1485,9 @@ void EditView::DrawEOLAnnotationText(Surface *surface, const EditModel &model, c
const char *textFoldDisplay = model.GetFoldDisplayText(line);
if (textFoldDisplay) {
const std::string_view foldDisplayText(textFoldDisplay);
- rcSegment.left += (static_cast<int>(surface->WidthText(fontText, foldDisplayText)) + vsDraw.aveCharWidth);
+ rcSegment.left += static_cast<int>(
+ surface->WidthText(vsDraw.styles[StyleFoldDisplayText].font.get(), foldDisplayText)) +
+ vsDraw.aveCharWidth;
}
rcSegment.right = rcSegment.left + static_cast<XYPOSITION>(widthEOLAnnotationText);