The branch, str-metrics, has been updated.

- Log -----------------------------------------------------------------

commit 8f100e1d25490e24adc211a1093e66e08daf3349
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Dec 20 12:12:27 2013 +0100

    Small fixes to cursor positioning.
    
    Two small fixed to Row::Element::x2pos:
    * fix position for elements that are not strings
    * make rounding match the old code

diff --git a/src/Row.cpp b/src/Row.cpp
index d7940e9..86b7d06 100644
--- a/src/Row.cpp
+++ b/src/Row.cpp
@@ -86,10 +86,12 @@ pos_type Row::Element::x2pos(double &x, bool const low) 
const
                //      lyxerr << " NOT FOUND ";
        }
 
-       if (i == str.size())
+       if (type == STRING && i == str.size())
                x2 = w;
-       // round to the closest side
-       else if (!low && (x2 - last_w > w - x2)) {
+       // round to the closest side. The !rtl is here to obtain the
+       // same rounding as with the old code (this is cosmetic and
+       // can be eventually removed).
+       else if (!low && (x2 - last_w + !rtl > w - x2)) {
                x2 = w;
                ++i;
        } else

-----------------------------------------------------------------------

Summary of changes:
 src/Row.cpp |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Repository for new features

Reply via email to