]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=4599
[lyx.git] / src / TextMetrics.cpp
index 74f8d29b8d1dca2b5d6eb9ff117f49a6f33e2912..381e6cb3263a6f0887ee9dd1064b9ec9fb0e5018 100644 (file)
@@ -1532,8 +1532,8 @@ int TextMetrics::cursorX(CursorSlice const & sl,
        if (inlineCompletionPos.inTexted()
            && inlineCompletionPos.text() == text_
            && inlineCompletionPos.pit() == pit
-           && inlineCompletionPos.pos() >= row_pos
-           && inlineCompletionPos.pos() <= end) {
+           && inlineCompletionPos.pos() - 1 >= row_pos
+           && inlineCompletionPos.pos() - 1 < end) {
                // draw logically behind the previous character
                inlineCompletionVPos = bidi.log2vis(inlineCompletionPos.pos() - 1);
        }