commit a29e22a9fd274f59fcf2a9fdb1347477b5b9c187
Author: Juergen Spitzmueller <[email protected]>
Date: Sat Jun 28 17:21:10 2025 +0200
Fix crash when leaving unfinished math macro with preview off (#13192)
---
src/mathed/InsetMathHull.cpp | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 57ef566c56..16b7545446 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -893,18 +893,19 @@ 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