- if (n && n->isActive()) {
- //lyxerr << "... descend" << endl;
- push_back(CursorSlice(*n));
- return;
- }
-
- // otherwise move on one position if possible
- if (tip.pos() < lastp) {
- //lyxerr << "... next pos" << endl;
- ++tip.pos();
- return;
- }
- //lyxerr << "... no next pos" << endl;
-
- // otherwise move on one paragraph if possible
- if (tip.pit() < lastpit()) {
- //lyxerr << "... next par" << endl;
- ++tip.pit();
- tip.pos() = 0;
- return;
- }
- //lyxerr << "... no next pit" << endl;
-
- // otherwise try to move on one cell if possible
- if (tip.idx() < lastidx()) {
- //lyxerr << "... next idx" << endl;
- ++tip.idx();
- tip.pit() = 0;
- tip.pos() = 0;