From 0fbee62e357b8d02ea86ee09b7e5c813200ce7ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 21 Oct 2003 17:16:01 +0000 Subject: [PATCH] fix row breaking git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7944 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/text.C | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/text.C b/src/text.C index c89e60e636..2c76feea3c 100644 --- a/src/text.C +++ b/src/text.C @@ -717,10 +717,9 @@ pos_type LyXText::rowBreakPoint(ParagraphList::iterator pit, } x += thiswidth; + //lyxerr << "i: " << i << " x: " << x << " width: " << width << endl; chunkwidth += thiswidth; - InsetOld * in = pit->getInset(i); - // break before a character that will fall off // the right of the row if (x >= width) { @@ -728,11 +727,12 @@ pos_type LyXText::rowBreakPoint(ParagraphList::iterator pit, if (point == last || chunkwidth >= width - left) { if (pos < i) { point = i - 1; - break; } } + break; } + InsetOld * in = pit->getInset(i); if (!in || in->isChar()) { // some insets are line separators too if (pit->isLineSeparator(i)) { @@ -2143,6 +2143,7 @@ int LyXText::redoParagraphInternal(ParagraphList::iterator pit) Row row(z); z = rowBreakPoint(pit, row) + 1; row.end(z); + lyxerr << "break point at " << z << "/" << pit->size() << endl; pit->rows.push_back(row); RowList::iterator rit = boost::prior(pit->rows.end()); int const f = fill(pit, *rit, ww); -- 2.39.5