]> git.lyx.org Git - features.git/commitdiff
Update buffer when an inset or an INFO inset has bee inserted
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 Jan 2018 18:29:45 +0000 (19:29 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 6 Jan 2018 14:08:42 +0000 (15:08 +0100)
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

index 1333570813675eea4f7ea502f4cdbbcab825b84b..0eebbc026628e918738d766613c2c209c9122945 100644 (file)
@@ -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;
        }