mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
small bugfixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2312 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0901dfd71f
commit
3afd871c2d
@ -623,14 +623,22 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
|
||||
case LFUN_MATH_DELIM:
|
||||
{
|
||||
bv->lockedInsetStoreUndo(Undo::INSERT);
|
||||
int ilt = '(';
|
||||
int irt = '.';
|
||||
static const string vdelim("(){}[]./|");
|
||||
//lyxerr << "formulabase::LFUN_MATH_DELIM, arg: '" << arg << "'\n";
|
||||
|
||||
if (arg.empty())
|
||||
break;
|
||||
|
||||
// try to read integers first
|
||||
int ilt = '(';
|
||||
int irt = '.';
|
||||
istringstream is(arg.c_str());
|
||||
is >> ilt >> irt;
|
||||
|
||||
if (!is) { // ok, the beasties are no integers... try something else
|
||||
ilt = '(';
|
||||
irt = '.';
|
||||
|
||||
istringstream is(arg.c_str());
|
||||
string lt;
|
||||
string rt;
|
||||
@ -651,6 +659,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
|
||||
irt = l->id;
|
||||
} else if (vdelim.find(rt[0]) != string::npos)
|
||||
irt = rt[0];
|
||||
}
|
||||
|
||||
handleDelim(bv, ilt, irt);
|
||||
updateLocal(bv, true);
|
||||
|
@ -1109,9 +1109,9 @@ MathUpDownInset * MathCursor::nearbyUpDownInset() const
|
||||
MathInset * p = array().prevInset(cursor().pos_);
|
||||
if (p && p->isUpDownInset())
|
||||
return static_cast<MathUpDownInset *>(p);
|
||||
p = array().nextInset(cursor().pos_);
|
||||
if (p && p->isUpDownInset())
|
||||
return static_cast<MathUpDownInset *>(p);
|
||||
//p = array().nextInset(cursor().pos_);
|
||||
//if (p && p->isUpDownInset())
|
||||
// return static_cast<MathUpDownInset *>(p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user