LyX crashes when backward selecting during formula writing
The problem is basically that the anchor is not set (because there is no
selection going on) and BufferView::mouseSetCursor does not handle this.
* Cursor.cpp (anchor): return immediately when there is no selection.
* BufferView.cpp (mouseSetCursor): reset anchor before setting cursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30245
a592a061-630c-0410-9148-
cb99ea01b6c8
update |= checkDepm(cur, d->cursor_);
d->cursor_.macroModeClose();
+ d->cursor_.resetAnchor();
d->cursor_.setCursor(cur);
d->cursor_.boundary(cur.boundary());
if (do_selection)
CursorSlice Cursor::anchor() const
{
+ if (!selection())
+ return top();
LASSERT(anchor_.depth() >= depth(), /**/);
CursorSlice normal = anchor_[depth() - 1];
if (depth() < anchor_.depth() && top() <= normal) {