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) void mathDispatchInsertMath(BufferView * bv, string const & arg)
{ {
if (bv->available()) { if (bv->available()) {
if (arg.size() && arg[0] == '\\') if (arg.size() && arg[0] == '\\') {
openNewInset(bv, new InsetFormula(arg)); InsetFormula * f = new InsetFormula(arg);
else if (!bv->insertInset(f))
delete f;
} else
mathDispatchMathMode(bv, arg); mathDispatchMathMode(bv, arg);
} }
} }

View File

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