From: Jean-Marc Lasgouttes Date: Fri, 5 Jan 2018 18:29:45 +0000 (+0100) Subject: Update buffer when an inset or an INFO inset has bee inserted X-Git-Tag: lyx-2.4.0dev-acb2ca7b~4066 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=806f40dbd4e861e3def104f26a8b70ed8c3ba386;hp=6253cc4c51e4e36125c33a8c427e27493435ddc8;p=lyx.git Update buffer when an inset or an INFO inset has bee inserted This is important for info inset, since if updateBuffer needs to be run in redoParagraph (for the macro code), crashes can happen. Fixes bug #10944. --- diff --git a/src/Text3.cpp b/src/Text3.cpp index 0c5699ba32..7686687815 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1197,6 +1197,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) if (cur.selection()) cutSelection(cur, true, false); cur.insert(inset); + cur.forceBufferUpdate(); if (inset->editable() && inset->asInsetText()) inset->edit(cur, true); else @@ -1934,6 +1935,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) break; cur.recordUndo(); insertInset(cur, inset); + cur.forceBufferUpdate(); cur.posForward(); break; }