{
return;
- lyxerr << "MC: " << what
- << " cursor.pos: " << cursor().pos_
- << " cursor.idx: " << cursor().idx_
- << " cursor.par: " << cursor().par_
- << " sel: " << selection
- << " data: " << array()
- << "\n";
+ lyxerr << "MC: " << what << "\n";
+ for (unsigned i = 0; i < Cursor_.size(); ++i)
+ lyxerr << " i: " << i
+ << " pos: " << Cursor_[i].pos_
+ << " idx: " << Cursor_[i].idx_
+ << " par: " << Cursor_[i].par_ << "\n";
+
+ //lyxerr << " sel: " << selection << " data: " << array() << "\n";
}
MathInset * p = prevInset();
if (openable(p, sel, false)) {
- array().prev(cursor().pos_);
+ plainLeft();
push(p, false);
return true;
}
- if (array().prev(cursor().pos_))
+ if (plainLeft())
return true;
if (cursor().par_->idxLeft(cursor().idx_, cursor().pos_))
return true;
if (openable(n, selection, true) && n->covers(x, y))
push(n, true);
else if (openable(p, selection, true) && p->covers(x, y)) {
- array().prev(cursor().pos_);
+ plainLeft();
push(p, false);
} else
break;
Delete();
}
-#ifdef WITH_WARNINGS
-#warning pullArg disabled
-#endif
- //if (cursor().pos_ == 0 && Cursor_.size() >= 1) {
- // lyxerr << "Delete: popping...\n";
- // pop();
- //}
-
dump("Delete 2");
}
if (p) {
int idx, pos;
if (p->idxLastUp(idx, pos)) {
- array().prev(cursor().pos_);
+ plainLeft();
push(p, false);
cursor().par_ = p;
cursor().idx_ = idx;
if (p) {
int idx, pos;
if (p->idxLastDown(idx, pos)) {
- array().prev(cursor().pos_);
+ plainLeft();
push(p, false);
cursor().idx_ = idx;
cursor().pos_ = pos;
if (!p) {
p = new MathScriptInset(true, false);
insert(p);
- array().prev(cursor().pos_);
+ plainLeft();
}
push(p, true);
p->up(true);
if (!p) {
p = new MathScriptInset(false, true);
insert(p);
- array().prev(cursor().pos_);
+ plainLeft();
}
push(p, true);
p->down(true);
SelCut();
insert(p);
if (p->nargs()) {
- array().prev(cursor().pos_);
+ plainLeft();
push(p, true);
if (oldsel)
SelPaste();
p->cell(0) = theSelection.glue();
}
insert(p);
+ plainLeft();
push(p, true);
}
void MathCursor::pullArg()
{
// pullArg
+ dump("pullarg");
MathArray a = array();
- if (!Left())
- return;
- normalize();
- array().erase(cursor().pos_);
- array().insert(cursor().pos_, a);
+ if (pop()) {
+ array().erase(cursor().pos_);
+ array().insert(cursor().pos_, a);
+ }
}