]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Revert "Fixup 0cbe0d7a: avoid double redraw when completion is finished"
[lyx.git] / src / TextMetrics.cpp
index 00fb217c0ad5628d8c628376288affe680c773e0..2dea92bbff3befd3102eb48a02b61572710830c8 100644 (file)
@@ -979,7 +979,7 @@ class flexible_const_iterator {
 public:
 
        //
-       flexible_const_iterator operator++() {
+       flexible_const_iterator operator++() {
                if (pile_.empty())
                        ++cit_;
                else
@@ -1131,7 +1131,9 @@ RowList TextMetrics::breakParagraph(Row const & bigrow) const
                rb.push_back(elt);
                rb.finalizeLast();
                if (rb.width() > width) {
-                       LATTEST(tail.empty());
+                       // Keep the tail for later; this ought to be rare, but play safe.
+                       if (!tail.empty())
+                               fcit.put(tail);
                        // if the row is too large, try to cut at last separator.
                        tail = rb.shortenIfNeeded(width, next_width);
                }