commit 6a5a6b8e541f0403ee768dc9986086be7339edce
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Wed Jul 2 16:34:34 2025 +0200

    Revert "Fix crash when leaving unfinished math macro with preview off 
(#13192)"
    
    It will be replaced by a less intrusive fix.
    
    This reverts commit a29e22a9fd274f59fcf2a9fdb1347477b5b9c187.
---
 src/mathed/InsetMathHull.cpp | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 8c431e7c0b..74c0a73f3e 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -893,19 +893,18 @@ void InsetMathHull::loadPreview(DocIterator const & pos) 
const
 
 bool InsetMathHull::notifyCursorLeaves(Cursor const & old, Cursor & cur)
 {
-       if (RenderPreview::previewMath())
+       if (RenderPreview::previewMath()) {
                reloadPreview(old);
-
-       /** FIXME: currently, SinglePar operates on the current
-        * paragraph at processUpdateFlags time (here cur) and not the
-        * paragraph where the change happened (old). When this is
-        * fixed, the following test will become useless.
-        */
-       if (&old.innerParagraph() == &cur.innerParagraph())
-               cur.screenUpdateFlags(Update::SinglePar);
-       else
-               cur.screenUpdateFlags(Update::Force);
-
+               /** FIXME: currently, SinglePar operates on the current
+                * paragraph at processUpdateFlags time (here cur) and not the
+                * paragraph where the change happened (old). When this is
+                * fixed, the following test will become useless.
+                */
+               if (&old.innerParagraph() == &cur.innerParagraph())
+                       cur.screenUpdateFlags(Update::SinglePar);
+               else
+                       cur.screenUpdateFlags(Update::Force);
+       }
        return false;
 }
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to