]> git.lyx.org Git - features.git/blobdiff - src/buffer.C
small stuff
[features.git] / src / buffer.C
index 5be67668d69eae1ef629c3c34f9bdc718e28d6ba..3701b7768301e033e35fd04db72f5353d9aee5df 100644 (file)
@@ -431,7 +431,6 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                        par->insertChar(pos, (*cit), font);
                        ++pos;
                }
-               checkminipage = true;
 #ifdef NO_LATEX
                }
 #endif
@@ -590,7 +589,9 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                }
 
                if (!inset) {
+#ifndef NO_PEXTRA_REALLY
                        --call_depth;
+#endif
                        return false; // no end read yet
                }
                
@@ -1041,9 +1042,6 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                // But insets should read it, it is a part of
                // the inset isn't it? Lgb.
        } else if (token == "\\begin_inset") {
-               // Does this fix it? YES!
-               checkminipage = true;
-               
 #ifdef NO_LATEX
                insertErtContents(par, pos, font, false);
                ert_stack.push(ert_comp);
@@ -1108,9 +1106,6 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                inset->read(this, lex);
                par->insertInset(pos, inset, font);
                ++pos;
-               // because of OLD_TABULAR_READ where tabulars have been
-               // one paragraph.
-               checkminipage = true;
        } else if (token == "\\hfill") {
                par->insertChar(pos, Paragraph::META_HFILL, font);
                ++pos;
@@ -1153,7 +1148,9 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                insertErtContents(par, pos, font);
 #endif
                the_end_read = true;
+#ifndef NO_PEXTRA_REALLY
                minipar = parBeforeMinipage = 0;
+#endif
        } else {
 #ifdef NO_LATEX
                if (ert_comp.active) {
@@ -1173,7 +1170,17 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
                }
 #endif
        }
+
 #ifndef NO_PEXTRA_REALLY
+       // I wonder if we could use this blanket fix for all the
+       // checkminipage cases...
+       if (par && par->size()) {
+               // It is possible that this will check to often,
+               // but that should not be an correctness issue.
+               // Only a speed issue.
+               checkminipage = true;
+       }
+       
        // now check if we have a minipage paragraph as at this
        // point we already read all the necessary data!
        // this cannot be done in layout because there we did
@@ -1315,8 +1322,8 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
        }
        }
        // End of pextra_minipage compability
-#endif
        --call_depth;
+#endif
        return the_end_read;
 }