From: Jean-Marc Lasgouttes Date: Mon, 22 Apr 2002 22:31:49 +0000 (+0000) Subject: allow insertion of protected space in maths X-Git-Tag: 1.6.10~19364 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0c02b0e141fadbac4eff6121515d1079b89b4751;p=features.git allow insertion of protected space in maths git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4042 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index d000c7111e..4df1561821 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2002-04-22 Jean-Marc Lasgouttes + * lyxfunc.C (getStatus): LFUN_PROTECTED_SPACE is allowed in maths + * paragraph_pimpl.C (simpleTeXSpecialChars): remove bogus ensuremath around textordmasculine, textordfeminine and textdegree. diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 97b33f7f8c..e71a977d1d 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -661,9 +661,13 @@ FuncStatus LyXFunc::getStatus(kb_action action, case LFUN_MENU_SEPARATOR: case LFUN_LDOTS: case LFUN_END_OF_SENTENCE: - case LFUN_PROTECTEDSPACE: code = Inset::SPECIALCHAR_CODE; break; + case LFUN_PROTECTEDSPACE: + // slight hack: we know this is allowed in math mode + if (!mathcursor) + code = Inset::SPECIALCHAR_CODE; + break; default: break; } diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index d704a9c996..1581e4f4b0 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2002-04-22 Jean-Marc Lasgouttes + + * formulabase.C (localDispatch): merge the cases for + LFUN_PROTECTEDSPACE and LFUN_MATH_SPACE, since they were identical. + 2002-04-16 Jean-Marc Lasgouttes * formulabase.C (localDispatch): handle arguments of diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 8836dc62f5..4d2152f455 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -602,14 +602,6 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, } break; - case LFUN_MATH_SPACE: - { - bv->lockedInsetStoreUndo(Undo::EDIT); - mathcursor->insert(MathAtom(new MathSpaceInset(1))); - updateLocal(bv, true); - break; - } - case LFUN_SUPERSCRIPT: case LFUN_SUBSCRIPT: { @@ -637,7 +629,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, } case LFUN_PROTECTEDSPACE: - //lyxerr << " called LFUN_PROTECTEDSPACE\n"; + case LFUN_MATH_SPACE: bv->lockedInsetStoreUndo(Undo::EDIT); mathcursor->insert(MathAtom(new MathSpaceInset(1))); updateLocal(bv, true);