]> git.lyx.org Git - features.git/commitdiff
More tweaking of boundary setting at end of row
authorJean-Marc <lasgouttes@lyx.org>
Mon, 28 Jul 2014 21:31:32 +0000 (23:31 +0200)
committerJean-Marc <lasgouttes@lyx.org>
Mon, 28 Jul 2014 21:31:32 +0000 (23:31 +0200)
src/Row.cpp
src/TextMetrics.cpp

index 34be0529aa944208beedf86b2741cbb9380ca4dc..023286e9cd1917e465be87ecaae07727dba19a52 100644 (file)
@@ -250,7 +250,8 @@ ostream & operator<<(ostream & os, Row const & row)
           << " ascent: " << row.dim_.asc
           << " descent: " << row.dim_.des
           << " separator: " << row.separator
-          << " label_hfill : " << row.label_hfill << "\n";
+          << " label_hfill: " << row.label_hfill 
+          << " row_boundary: " << row.right_boundary() << "\n";
        double x = row.x;
        Row::Elements::const_iterator it = row.elements_.begin();
        for ( ; it != row.elements_.end() ; ++it) {
index 0e16ab42b034ea1457d7977323f32b91e3692b7a..2927ca8e9d4e8b63eecd9664e259819075a99190 100644 (file)
@@ -1144,12 +1144,14 @@ pos_type TextMetrics::getPosNearX(Row const & row, int & x,
        }
 
        /** This tests for the case where the cursor is set at the end
-        * of a row which has been broken due to a display inset on
-        * next row. This is indicated by Row::right_boundary.
+        * of a row which has been broken due something else than a
+        * separator (a display inset or a forced breaking of the
+        * row). We know that there is a separator when the end of the
+        * row is larger than the end of its last element.
         */
        if (!row.empty() && pos == row.back().endpos
            && row.back().endpos == row.endpos())
-               boundary = row.right_boundary();
+               boundary = true;
 
        x += xo;
        return pos;