allow insertion of protected space in maths

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4042 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-04-22 22:31:49 +00:00
parent 3244a5507f
commit 0c02b0e141
4 changed files with 13 additions and 10 deletions

View File

@ -1,5 +1,7 @@
2002-04-22 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyxfunc.C (getStatus): LFUN_PROTECTED_SPACE is allowed in maths
* paragraph_pimpl.C (simpleTeXSpecialChars): remove bogus
ensuremath around textordmasculine, textordfeminine and
textdegree.

View File

@ -661,7 +661,11 @@ FuncStatus LyXFunc::getStatus(kb_action action,
case LFUN_MENU_SEPARATOR:
case LFUN_LDOTS:
case LFUN_END_OF_SENTENCE:
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:

View File

@ -1,3 +1,8 @@
2002-04-22 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* formulabase.C (localDispatch): merge the cases for
LFUN_PROTECTEDSPACE and LFUN_MATH_SPACE, since they were identical.
2002-04-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* formulabase.C (localDispatch): handle arguments of

View File

@ -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);