diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index f38c78d3ea..1f0c62b725 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -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