small up/down tweaking

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6084 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-02-10 15:45:56 +00:00
parent 6bf507826c
commit 0c7e6149ad

View File

@ -332,15 +332,17 @@ bool MathScriptInset::idxUpDown(idx_type & idx, pos_type & pos, bool up,
else {
// in nucleus
// don't go up/down unless in last position
if (pos != cell(2).size())
return false;
// don't go up/down if there is no cell.
if (!has(up))
return false;
// otherwise move into the first position
idx = up;
pos = 0;
// go up/down only if in the last position
// or in the first position of something with displayed limits
if (pos == cell(2).size() || (pos == 0 && hasLimits())) {
idx = up;
pos = 0;
return true;
}
return false;
}
return true;
}