leave mathed after math-insert if we have not been in mathed before

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2875 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-10-12 14:33:38 +00:00
parent 28c690f63c
commit 400fcfa1ee
2 changed files with 10 additions and 8 deletions

View File

@ -758,9 +758,11 @@ void mathDispatchInsertMatrix(BufferView * bv, string const & arg)
void mathDispatchInsertMath(BufferView * bv, string const & arg)
{
if (bv->available()) {
if (arg.size() && arg[0] == '\\')
openNewInset(bv, new InsetFormula(arg));
else
if (arg.size() && arg[0] == '\\') {
InsetFormula * f = new InsetFormula(arg);
if (!bv->insertInset(f))
delete f;
} else
mathDispatchMathMode(bv, arg);
}
}

View File

@ -1374,13 +1374,13 @@ void MathCursor::interpret(char c)
static char const greekl[][26] =
{"alpha", "beta", "chi", "delta", "epsilon", "phi",
"gamma", "eta", "iota", "epsilon", "kappa", "lambda", "mu",
"nu", "omikron", "pi", "vartheta", "rho", "sigma",
"nu", "omega", "pi", "vartheta", "rho", "sigma",
"tau", "upsilon", "theta", "omega", "xi", "varphi", "zeta"};
static char const greeku[][26] =
{"Alpha", "Beta", "chi", "Delta", "varepsilon", "Phi",
"Gamma", "Eta", "Iota", "Epsilon", "Kappa", "Lambda", "Mu",
"Nu", "Omikron", "Pi", "vartheta", "varrho", "Sigma", "varsigma",
"Upsilon", "Theta", "Omega", "Xi", "Varphi", "Zeta"};
{"alpha", "beta", "chi", "Delta", "varepsilon", "Phi",
"Gamma", "varepsilon", "varepsilon", "epsilon", "kappa", "Lambda", "mu",
"Nu", "Omega", "Pi", "vartheta", "varrho", "Sigma", "varsigma",
"Upsilon", "Theta", "Omega", "Xi", "Varphi", "zeta"};
latexkeys const * l = 0;
if ('a' <= c && c <= 'z')