commit 3fad30da63f7fa963269af1241438923f6dfa172
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Tue Jan 5 10:10:26 2016 +0100

    Fix entering inset in visual cursor mode
    
    Improve the test whether cursor has moved in Cursor::posVisLeft. The code 
for posVisRight had already been fixed for #5764 at 0730c923, but this replaces 
both tests by the proper == operator.
    
    Fixes bug #9913.

diff --git a/src/Cursor.cpp b/src/Cursor.cpp
index 29d4363..aed1414 100644
--- a/src/Cursor.cpp
+++ b/src/Cursor.cpp
@@ -732,10 +732,7 @@ bool Cursor::posVisRight(bool skip_inset)
 
        }
 
-       bool moved = (new_cur.pos() != pos()
-                                 || new_cur.pit() != pit()
-                                 || new_cur.boundary() != boundary()
-                                 || &new_cur.inset() != &inset());
+       bool const moved = new_cur != *this || new_cur.boundary() != boundary();
 
        if (moved) {
                LYXERR(Debug::RTL, "moving to: " << new_cur.pos()
@@ -832,9 +829,7 @@ bool Cursor::posVisLeft(bool skip_inset)
 
        }
 
-       bool moved = (new_cur.pos() != pos()
-                                 || new_cur.pit() != pit()
-                                 || new_cur.boundary() != boundary());
+       bool const moved = new_cur != *this || new_cur.boundary() != boundary();
 
        if (moved) {
                LYXERR(Debug::RTL, "moving to: " << new_cur.pos()
diff --git a/status.21x b/status.21x
index 155dfcb..2a2bb89 100644
--- a/status.21x
+++ b/status.21x
@@ -105,6 +105,8 @@ What's new
 
 - Reset cursor font after inset-select-all (bug 9719).
 
+- Fix one case where cursor does not enter insets correctly (bug 9913).
+
 - Correctly update previews when cursor leaves inset (bug 6173).
 
 - Fix subscripts and superscripts of \overrightarrow and related macros

Reply via email to