Make sure cursor is in texted after clicking

Fixes #9936.
This commit is contained in:
Enrico Forestieri 2016-01-20 01:18:42 +01:00
parent 764a2163bb
commit 8998b88370

View File

@ -2514,7 +2514,8 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
bool update = leftinset;
if (!do_selection && d->cursor_.inTexted()) {
update |= checkDepm(cur, d->cursor_);
if (cur.pos() && cur.paragraph().isEnvSeparator(cur.pos() - 1))
if (cur.inTexted() && cur.pos()
&& cur.paragraph().isEnvSeparator(cur.pos() - 1))
cur.posBackward();
}