From 572b29b139886b4ae9cb75888e1ce57e1cdcad7c Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 5 Jan 2018 19:29:45 +0100 Subject: [PATCH] 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. (cherry picked from commit 806f40dbd4e861e3def104f26a8b70ed8c3ba386) --- src/Text3.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Text3.cpp b/src/Text3.cpp index 1333570813..0eebbc0266 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1185,6 +1185,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 @@ -1922,6 +1923,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) break; cur.recordUndo(); insertInset(cur, inset); + cur.forceBufferUpdate(); cur.posForward(); break; } -- 2.39.5