fix enering of \_

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4027 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-04-18 15:29:27 +00:00
parent c57ca65f78
commit 83c2be0da4
2 changed files with 10 additions and 1 deletions

View File

@ -614,7 +614,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
case LFUN_SUBSCRIPT:
{
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->script((action == LFUN_SUPERSCRIPT));
mathcursor->script(action == LFUN_SUPERSCRIPT);
updateLocal(bv, true);
break;
}

View File

@ -1390,6 +1390,15 @@ bool MathCursor::interpret(string const & s)
bool MathCursor::script(bool up)
{
// Hack to get \\^ and \\_ working
if (inMacroMode() && macroName() == "\\") {
if (up)
interpret("\\mathcircumflex");
else
interpret('_');
return true;
}
macroModeClose();
selCut();
if (hasPrevAtom() && prevAtom()->asScriptInset()) {