]> git.lyx.org Git - features.git/commitdiff
Do not remove separators at end of rows.
authorJean-Marc <lasgouttes@lyx.org>
Thu, 16 Apr 2015 09:39:33 +0000 (11:39 +0200)
committerJean-Marc <lasgouttes@lyx.org>
Thu, 16 Apr 2015 09:39:33 +0000 (11:39 +0200)
I am not sure why I addd this code at the time. I do not think there was a good reason.

Fixes bug #9447.

src/TextMetrics.cpp

index 479e73091489b7859dded739281bd3e512b19f71..59eb2abd719269237c8314f32ccef4dc690b566e 100644 (file)
@@ -777,7 +777,7 @@ private:
 
 /** This is the function where the hard work is done. The code here is
  * very sensitive to small changes :) Note that part of the
- * intelligence is also in Row::shorten_if_needed
+ * intelligence is also in Row::shortenIfNeeded.
  */
 void TextMetrics::breakRow(Row & row, int const right_margin, pit_type const pit) const
 {
@@ -900,12 +900,6 @@ void TextMetrics::breakRow(Row & row, int const right_margin, pit_type const pit
        // if the row is too large, try to cut at last separator.
        row.shortenIfNeeded(body_pos, width);
 
-       // if the row ends with a separator that is not at end of
-       // paragraph, remove it
-       if (!row.empty() && row.back().type == Row::SEPARATOR
-           && row.endpos() < par.size())
-               row.pop_back();
-
        // make sure that the RTL elements are in reverse ordering
        row.reverseRTL(text_->isRTL(par));
 }