]> git.lyx.org Git - lyx.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>
Fri, 5 Jan 2018 18:32:17 +0000 (19:32 +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.

src/Text3.cpp

index 0c5699ba329c61343727e12d3836de18309661ad..7686687815863e94f2ba9e20f8f60e380d008e18 100644 (file)
@@ -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;
        }