Always place the cursor before a separator inset when clicking

This commit is contained in:
Enrico Forestieri 2016-01-16 16:41:04 +01:00
parent a3926b9e60
commit 55b3374f3e

View File

@ -2512,8 +2512,11 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
// FIXME: (2) if we had a working InsetText::notifyCursorLeaves,
// the leftinset bool would not be necessary (badcursor instead).
bool update = leftinset;
if (!do_selection && d->cursor_.inTexted())
if (!do_selection && d->cursor_.inTexted()) {
update |= checkDepm(cur, d->cursor_);
if (cur.pos() && cur.paragraph().isEnvSeparator(cur.pos() - 1))
cur.posBackward();
}
if (!do_selection)
d->cursor_.resetAnchor();