]> git.lyx.org Git - features.git/commitdiff
Revert "Fix bad cursor positioning when entering an inset"
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Jun 2017 14:46:49 +0000 (16:46 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Jun 2017 14:46:49 +0000 (16:46 +0200)
This is not ready yet.

This reverts commit 7ca7873112314963c3a43987f32484749ec3af58.

src/TextMetrics.cpp

index f38c78d3ea7d98e6799d17a41898eafe8bba1049..1f0c62b725b86230d9cc88622e6f4042d1e6195b 100644 (file)
@@ -1379,9 +1379,7 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y,
 
        // Try to descend recursively inside the inset.
        Inset * edited = inset->editXY(cur, x, y);
-       // FIXME: it is not clear that the test on position is needed
-       // Remove it if/when semantics of editXY is clarified
-       if (cur.text() == text_ && cur.pos() == it->pos) {
+       if (edited == inset && cur.pos() == it->pos) {
                // non-editable inset, set cursor after the inset if x is
                // nearer to that position (bug 9628)
                bool bound = false; // is modified by getPosNearX