From: Vincent van Ravesteijn Date: Tue, 7 Jul 2009 08:13:07 +0000 (+0000) Subject: Fix crash when selecting part of a macro and trying to resume macro-mode editing. X-Git-Tag: 2.0.0~6146 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ebe9b4227908712ca2fc7b0b2e099c98f266aede;p=features.git Fix crash when selecting part of a macro and trying to resume macro-mode editing. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30395 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 60a003395a..13aa8d3382 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1569,6 +1569,8 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c) return true; } + selClearOrDel(cur); + MathMacro const * macro = cur.inset().asInsetMath()->asMacro(); if (macro && macro->displayMode() == MathMacro::DISPLAY_UNFOLDED) { // resume macro_mode @@ -1580,8 +1582,6 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c) return true; } - selClearOrDel(cur); - if (c == '\n') { if (currentMode() <= InsetMath::TEXT_MODE) cur.insert(c);