commit 1f13491f06dbcaf2d942f84133441872787bc436
Author: Vincent van Ravesteijn <[email protected]>
Date: Fri Feb 7 17:14:36 2014 +0100
Return true to indicate we might have invalidated the cursor
If we don't do so, Cursor::notifyCursorLeavesOrEnters might continue with
an invalidated cursor.
Fixes-bug: #8329
diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp
index 2989e2b..9f05fe7 100644
--- a/src/mathed/MathMacroTemplate.cpp
+++ b/src/mathed/MathMacroTemplate.cpp
@@ -624,10 +624,13 @@ void MathMacroTemplate::edit(Cursor & cur, bool front,
EntryDirection entry_from
bool MathMacroTemplate::notifyCursorLeaves(Cursor const & old, Cursor & cur)
{
+ unsigned int const nargs_before = nargs();
commitEditChanges(cur, old);
updateLook();
cur.screenUpdateFlags(Update::Force);
- return InsetMathNest::notifyCursorLeaves(old, cur);
+ // If we have removed a cell, we might have invalidated the cursor
+ return InsetMathNest::notifyCursorLeaves(old, cur)
+ || nargs() < nargs_before;
}