From 9e7832915f9763510e5820167930a38e16a8321f Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 22 Oct 2018 15:29:08 +0200 Subject: [PATCH] Amend 8d8988de: it is too early for skipping the updateMacros call --- src/BufferView.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 7bdf9f3807..ce1ec72ad7 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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.