commit a95787983974e33ad4987b69755cf3303aac1874
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Tue Aug 23 17:43:38 2016 +0200

    Move correctly the end of proof marker when row is large
    
    This was a regression from 2.1.x in LtR mode, and it never worked correctly 
in RtL mode.
    
    Fixes bug #10344.
    
    (cherry picked from commit 07c7dae367aea2ebc6486d1cc67b11c409f2d8a0)
---
 src/RowPainter.cpp |   15 +++++++++------
 status.22x         |    2 ++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index ae7ed4d..5ee2e03 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -540,14 +540,17 @@ void RowPainter::paintLast()
                FontMetrics const & fm = theFontMetrics(font);
                int const size = int(0.75 * fm.maxAscent());
                int const y = yo_ - size;
-               int const max_row_width = width_ - size - 
Inset::TEXT_TO_INSET_OFFSET;
-               int x = is_rtl ? nestMargin() + changebarMargin()
-                       : max_row_width - row_.right_margin;
 
                // If needed, move the box a bit to avoid overlapping with text.
-               int const rem = max_row_width - row_.width();
-               if (rem <= 0)
-                       x += is_rtl ? rem : - rem;
+               int x = 0;
+               if (is_rtl) {
+                       int const normal_x = nestMargin() + changebarMargin();
+                       x = min(normal_x, row_.left_margin - size - 
Inset::TEXT_TO_INSET_OFFSET);
+               } else {
+                       int const normal_x = width_ - row_.right_margin
+                               - size - Inset::TEXT_TO_INSET_OFFSET;
+                       x = max(normal_x, row_.width());
+               }
 
                if (endlabel == END_LABEL_BOX)
                        pi_.pain.rectangle(x, y, size, size, Color_eolmarker);
diff --git a/status.22x b/status.22x
index 0d485dc..03797eb 100644
--- a/status.22x
+++ b/status.22x
@@ -91,6 +91,8 @@ What's new
 - When doing a selection with Shift-click, make sure that the selection anchor
   is correct.
 
+- Avoid to overwrite end-of-proof character with text on screen (bug
+  10344).
 
 * INTERNALS
 

Reply via email to