]> git.lyx.org Git - features.git/commitdiff
Make sure cursor is in texted after clicking
authorEnrico Forestieri <forenr@lyx.org>
Wed, 20 Jan 2016 00:18:42 +0000 (01:18 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 20 Jan 2016 00:18:42 +0000 (01:18 +0100)
Fixes #9936.

src/BufferView.cpp

index 6de832dae58715af6b55b0286c882e39595b596d..81ebe79977370d21bf2e54341cd2ab5d400dc955 100644 (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();
        }