]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacro.cpp
fix a crash when the inset containing the new word at cursor is deleted
[lyx.git] / src / mathed / MathMacro.cpp
index 3e4f4409901b3e9a490cd0f7a2ae06af37d411d5..d96dc31b449623fbe62f5cd3352523d6b25f860b 100644 (file)
@@ -643,6 +643,7 @@ bool MathMacro::notifyCursorLeaves(Cursor const & old, Cursor & cur)
                        inset_cursor.cell().erase(inset_cursor.pos());
                        inset_cursor.cell().insert(inset_cursor.pos(),
                                createInsetMath(unfolded_name, cur.buffer()));
+                       cur.resetAnchor();
                        cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
                        return true;
                }