LyXCursor cur;
ParagraphList::iterator pit = cursor.par();
- if (rit == beginRow(pit))
- --pit;
- rit = previousRow(rit);
+ previousRow(pit, rit);
setCursor(cur, pit, rit->pos(), false);
if (cur.y() > top_y())
cursorUp(true);
+ bv()->theLockingInset()->insetInInsetY());
}
- getRowNearY(y);
+ ParagraphList::iterator dummypit;
+ getRowNearY(y, dummypit);
setCursorFromCoordinates(cursor.x_fix(), y);
// + bv->workHeight());
}
ParagraphList::iterator pit = cursor.par();
- if (boost::next(rit) == endRow(pit))
- ++pit;
- rit = nextRow(rit);
+ nextRow(pit, rit);
LyXCursor cur;
setCursor(cur, pit, rit->pos(), false);
if (cur.y() < top_y() + bv()->workHeight())
if (!isInInset() && bv->theLockingInset())
break;
if (cmd.button() == mouse_button::button1) {
- if (!isInInset())
- bv->screen().toggleSelection(this, bv);
cursorHome();
selection.cursor = cursor;
cursorEnd();
setSelection();
- if (!isInInset())
- bv->screen().toggleSelection(this, bv, false);
bv->update();
bv->haveSelection(selection.set());
}
if (!isInInset() && bv->theLockingInset())
break;
if (cmd.button() == mouse_button::button1) {
- if (!isInInset()) {
- bv->screen().toggleSelection(this, bv);
- selectWord(lyx::WHOLE_WORD_STRICT);
- bv->screen().toggleSelection(this, bv, false);
- } else {
- selectWord(lyx::WHOLE_WORD_STRICT);
- }
+ selectWord(lyx::WHOLE_WORD_STRICT);
bv->update();
bv->haveSelection(selection.set());
}
bv->text->setSelection();
bv->update();
- bv->fitCursor();
break;
}
selection_possible = true;
// Clear the selection
- bv->screen().toggleSelection(bv->text, bv);
bv->text->clearSelection();
bv->update();
bv->updateScrollbar();
// stack. They don't *have* to
// alter the document...
// (Joacim)
- // ...or maybe the SetCursorParUndo()
+ // ...or maybe the recordUndo()
// below isn't necessary at all anylonger?
if (inset_hit->lyxCode() == InsetOld::REF_CODE)
recordUndo(bv, Undo::ATOMIC);
case LFUN_INSET_CAPTION:
#endif
case LFUN_INSERT_NOTE:
+ case LFUN_INSERT_BRANCH:
case LFUN_INSERT_BIBITEM:
case LFUN_INSET_ERT:
case LFUN_INSET_FLOAT: