]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
Fix bug 2485 and crash on middle mouse paste on math
[lyx.git] / src / text2.C
index 3df5592a45e34372c377a3fc09d92634deabfd0a..f907f329bef8a29c174a0f99682c60dcb0a4cdc2 100644 (file)
@@ -648,7 +648,7 @@ void LyXText::insertStringAsParagraphs(LCursor & cur, string const & str)
                                linestr[i] = ' ';
                                newline_inserted = true;
                        }
-               } else if (IsPrintable(linestr[i])) {
+               } else if (isPrintable(linestr[i])) {
                        newline_inserted = false;
                }
        }
@@ -1274,7 +1274,9 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor & old)
                                cur.resetAnchor();
                        }
                }
-               updateCounters(old.buffer());
+               ParIterator par_it(old);
+               if (needsUpdateCounters(old.buffer(), par_it))
+                       updateCounters(old.buffer());
                return true;
        }