]> git.lyx.org Git - features.git/commitdiff
Amend 4ecbff00: 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 15:19:40 +0000 (17:19 +0200)
(cherry picked from commit 9e7832915f9763510e5820167930a38e16a8321f)

src/BufferView.cpp

index d2f324d168b15a9661c826fe0f8cc8713bcf916e..173c7b0a7eadde7f15d82d345e028c151b643681 100644 (file)
@@ -476,6 +476,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. However, 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.