diff --git a/src/Text3.cpp b/src/Text3.cpp index 0c43320ed9..37ff51fc8a 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -2241,6 +2241,14 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, enable = !inDescriptionItem(cur); break; + case LFUN_MATH_INSERT: + case LFUN_MATH_MATRIX: + case LFUN_MATH_DELIM: + case LFUN_MATH_BIGDELIM: + // not allowed in ERT, for example. + enable = cur.inset().insetAllowed(MATH_CODE); + break; + case LFUN_WORD_DELETE_FORWARD: case LFUN_WORD_DELETE_BACKWARD: case LFUN_LINE_DELETE: @@ -2292,10 +2300,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_MATH_DISPLAY: case LFUN_MATH_MODE: case LFUN_MATH_MACRO: - case LFUN_MATH_MATRIX: - case LFUN_MATH_DELIM: - case LFUN_MATH_BIGDELIM: - case LFUN_MATH_INSERT: case LFUN_MATH_SUBSCRIPT: case LFUN_MATH_SUPERSCRIPT: case LFUN_FONT_DEFAULT: