]> git.lyx.org Git - features.git/commitdiff
Amend 8d8988de: it is too early for skipping the updateMacros call
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 22 Oct 2018 13:29:08 +0000 (15:29 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 22 Oct 2018 13:29:56 +0000 (15:29 +0200)
src/BufferView.cpp

index 7bdf9f38076a9e14f2a107432f29f9b9e3217ce6..ce1ec72ad7c51901a46bb4b3b13d075b6f93543c 100644 (file)
@@ -492,6 +492,14 @@ void BufferView::processUpdateFlags(Update::flags flags)
        if (flags == Update::None)
                return;
 
+       /* FIXME We would like to avoid doing this here, since it is very
+        * expensive and is called in updateBuffer already. Howaver, even
+        * inserting a plain character can invalidate the overly fragile
+        * tables of child documents built by updateMacros. Some work is
+        * needed to avoid doing that when not necessary.
+        */
+       buffer_.updateMacros();
+
        // SinglePar is ignored for now (this should probably change). We
        // set it ourselves below, at the price of always rebreaking the
        // paragraph at cursor. This can be expensive for large tables.