tiny cleanup

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2336 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-07-25 09:32:38 +00:00
parent 74d58b9bd0
commit e152ea21dc
2 changed files with 4 additions and 5 deletions

View File

@ -664,6 +664,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
} }
case LFUN_PROTECTEDSPACE: case LFUN_PROTECTEDSPACE:
//lyxerr << " called LFUN_PROTECTEDSPACE\n";
bv->lockedInsetStoreUndo(Undo::INSERT); bv->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->insert(new MathSpaceInset(1)); mathcursor->insert(new MathSpaceInset(1));
updateLocal(bv, true); updateLocal(bv, true);

View File

@ -233,7 +233,7 @@ bool MathCursor::openable(MathInset * p, bool sel, bool useupdown) const
return false; return false;
if (sel) { if (sel) {
// we can't move into everything during selection // we can't move into anything new during selection
if (Cursor_.size() == Anchor_.size()) if (Cursor_.size() == Anchor_.size())
return false; return false;
if (p != Anchor_[Cursor_.size()].par_) if (p != Anchor_[Cursor_.size()].par_)
@ -503,7 +503,7 @@ bool MathCursor::Up(bool sel)
if (selection) { if (selection) {
int x = xarray().pos2x(cursor().pos_); int x = xarray().pos2x(cursor().pos_);
if (cursor().par_->idxUp(cursor().idx_, cursor().pos_)) { if (cursor().idxDown()) {
cursor().pos_ = xarray().x2pos(x); cursor().pos_ = xarray().x2pos(x);
return true; return true;
} }
@ -518,7 +518,6 @@ bool MathCursor::Up(bool sel)
int idx, pos; int idx, pos;
if (p->idxFirstUp(idx, pos)) { if (p->idxFirstUp(idx, pos)) {
push(p, true); push(p, true);
cursor().par_ = p;
cursor().idx_ = idx; cursor().idx_ = idx;
cursor().pos_ = pos; cursor().pos_ = pos;
dump("Up 3"); dump("Up 3");
@ -532,7 +531,6 @@ bool MathCursor::Up(bool sel)
if (p->idxLastUp(idx, pos)) { if (p->idxLastUp(idx, pos)) {
plainLeft(); plainLeft();
push(p, false); push(p, false);
cursor().par_ = p;
cursor().idx_ = idx; cursor().idx_ = idx;
cursor().pos_ = pos; cursor().pos_ = pos;
dump("Up 4"); dump("Up 4");
@ -595,7 +593,7 @@ bool MathCursor::Down(bool sel)
} }
int x = xarray().pos2x(cursor().pos_); int x = xarray().pos2x(cursor().pos_);
if (cursor().par_->idxDown(cursor().idx_, cursor().pos_)) { if (cursor().idxDown()) {
cursor().pos_ = xarray().x2pos(x); cursor().pos_ = xarray().x2pos(x);
return true; return true;
} }