commit 55b3374f3e3047a0aa7584e0737d1fcd40fe6809
Author: Enrico Forestieri <[email protected]>
Date:   Sat Jan 16 16:41:04 2016 +0100

    Always place the cursor before a separator inset when clicking

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 7332ec5..6de832d 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -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();

Reply via email to