]> git.lyx.org Git - features.git/commitdiff
This should fix the "oops" in the "is a bit silly" bug fix
authorMartin Vermeer <martin.vermeer@hut.fi>
Wed, 22 Oct 2003 06:02:55 +0000 (06:02 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Wed, 22 Oct 2003 06:02:55 +0000 (06:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7947 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text.C

index 6cbb3deb1a4edb1c7ba79168f5aead1d8f327c50..1673d16b59933ac560104ccbeadc7bfcbcb390a5 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-22  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * text.C: fixed an "oops" in the "is a bit silly" 
+       bug fix
 
 2003-10-21  André Pönitz  <poenitz@gmx.net>
 
index dcc0cbcfb84cd50cb564e52732849656c40a3552..c065bc19da954170a015d0512153d82ca5c4359a 100644 (file)
@@ -727,16 +727,21 @@ pos_type LyXText::rowBreakPoint(ParagraphList::iterator pit,
                        if (point == last || chunkwidth >= width - left) {
                                if (pos < i) {
                                        point = i - 1;
+                                       // exit on last registered breakpoint:
+                                       break;  
                                }
                        }
-                       break;
+               // emergency exit:
+               if (i + 1 < last)               
+                       break;  
                }
 
                InsetOld * in = pit->getInset(i);
                if (!in || in->isChar()) {
                        // some insets are line separators too
                        if (pit->isLineSeparator(i)) {
-                               point = i;
+                               // register breakpoint:
+                               point = i; 
                                chunkwidth = 0;
                        }
                }
@@ -1453,7 +1458,8 @@ void LyXText::prepareToPrint(ParagraphList::iterator pit,
                // Display-style insets should always be on a centred row
                // The test on pit->size() is to catch zero-size pars, which
                // would trigger the assert in Paragraph::getInset().
-               inset = pit->size() ? pit->getInset(rit->pos()) : 0;
+               //inset = pit->size() ? pit->getInset(rit->pos()) : 0;
+               inset = pit->isInset(rit->pos()) ? pit->getInset(rit->pos()) : 0;
                if (inset && inset->display()) {
                        align = LYX_ALIGN_CENTER;
                }