mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
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
This commit is contained in:
parent
7e5bdec673
commit
042c5bf425
@ -1920,6 +1920,7 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
|
||||
update |= checkDepm(cur, d->cursor_);
|
||||
d->cursor_.macroModeClose();
|
||||
|
||||
d->cursor_.resetAnchor();
|
||||
d->cursor_.setCursor(cur);
|
||||
d->cursor_.boundary(cur.boundary());
|
||||
if (do_selection)
|
||||
|
@ -923,6 +923,8 @@ void Cursor::posVisToRowExtremity(bool left)
|
||||
|
||||
CursorSlice Cursor::anchor() const
|
||||
{
|
||||
if (!selection())
|
||||
return top();
|
||||
LASSERT(anchor_.depth() >= depth(), /**/);
|
||||
CursorSlice normal = anchor_[depth() - 1];
|
||||
if (depth() < anchor_.depth() && top() <= normal) {
|
||||
|
Loading…
Reference in New Issue
Block a user