cursor up/down behind scripts fixed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2874 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-10-12 14:09:00 +00:00
parent df46e40ccb
commit 28c690f63c

View File

@ -573,6 +573,7 @@ bool MathCursor::up(bool sel)
MathAtom & p = prevAtom(); MathAtom & p = prevAtom();
if (p->asScriptInset() && p->asScriptInset()->hasUp()) { if (p->asScriptInset() && p->asScriptInset()->hasUp()) {
pushRight(p); pushRight(p);
idx() = 1;
pos() = size(); pos() = size();
return true; return true;
} }
@ -582,6 +583,7 @@ bool MathCursor::up(bool sel)
MathAtom & n = nextAtom(); MathAtom & n = nextAtom();
if (n->asScriptInset() && n->asScriptInset()->hasUp()) { if (n->asScriptInset() && n->asScriptInset()->hasUp()) {
pushLeft(n); pushLeft(n);
idx() = 1;
pos() = 0; pos() = 0;
return true; return true;
} }
@ -604,6 +606,7 @@ bool MathCursor::down(bool sel)
MathAtom & p = prevAtom(); MathAtom & p = prevAtom();
if (p->asScriptInset() && p->asScriptInset()->hasDown()) { if (p->asScriptInset() && p->asScriptInset()->hasDown()) {
pushRight(p); pushRight(p);
idx() = 0;
pos() = size(); pos() = size();
return true; return true;
} }
@ -613,6 +616,7 @@ bool MathCursor::down(bool sel)
MathAtom & n = nextAtom(); MathAtom & n = nextAtom();
if (n->asScriptInset() && n->asScriptInset()->hasDown()) { if (n->asScriptInset() && n->asScriptInset()->hasDown()) {
pushLeft(n); pushLeft(n);
idx() = 0;
pos() = 0; pos() = 0;
return true; return true;
} }
@ -1369,14 +1373,14 @@ void MathCursor::interpret(char c)
if (isalpha(c) && (lastcode_ == LM_TC_GREEK || lastcode_ == LM_TC_GREEK1)) { if (isalpha(c) && (lastcode_ == LM_TC_GREEK || lastcode_ == LM_TC_GREEK1)) {
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", "iota", "kappa", "lambda", "mu", "gamma", "eta", "iota", "epsilon", "kappa", "lambda", "mu",
"nu", "omikron", "pi", "omega", "rho", "sigma", "nu", "omikron", "pi", "vartheta", "rho", "sigma",
"tau", "upsilon", "theta", "omega", "xi", "upsilon", "zeta"}; "tau", "upsilon", "theta", "omega", "xi", "varphi", "zeta"};
static char const greeku[][26] = static char const greeku[][26] =
{"Alpha", "Beta", "Chi", "Delta", "Epsilon", "Phi", {"Alpha", "Beta", "chi", "Delta", "varepsilon", "Phi",
"Gamma", "Eta", "Iota", "Iota", "Kappa", "Lambda", "Mu", "Gamma", "Eta", "Iota", "Epsilon", "Kappa", "Lambda", "Mu",
"Nu", "Omikron", "Pi", "Omega", "Rho", "Sigma", "Tau", "Nu", "Omikron", "Pi", "vartheta", "varrho", "Sigma", "varsigma",
"Upsilon", "Theta", "Omega", "xi", "Upsilon", "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')