Bo Peng wrote:

> The problem with bug 3903
> (http://bugzilla.lyx.org/show_bug.cgi?id=3903) is clear, there is no
> notifyCursorLeave when you are not in an InsetMathHull (the outer
> level of the inset). Therefore, after you edit in, for example, super
> or subscript, math preview is not updated.

The following fix (based on your nice explanation) seems to cure the problem
without major rearrangements, but I didn't tested it well.

A/

Index: BufferView.cpp
===================================================================
--- BufferView.cpp	(revision 18842)
+++ BufferView.cpp	(working copy)
@@ -1351,7 +1351,7 @@
 	bool badcursor = false;
 	bool leftinset = (&cursor_.inset() != &cur.inset());
 	if (leftinset)
-		badcursor = cursor_.inset().notifyCursorLeaves(cursor_);
+		badcursor = notifyCursorLeaves(cursor_, cur);
 
 	// do the dEPM magic if needed
 	// FIXME: (1) move this to InsetText::notifyCursorLeaves?

Reply via email to