]> git.lyx.org Git - features.git/blobdiff - src/TextMetrics.cpp
Fix bug #7518: Assert when selecting in RTL text
[features.git] / src / TextMetrics.cpp
index 50f6062275a685b238031c94eb8c02cccc8bf8f5..6c32ee4dc6d19de91f3da3a6b8fb06cce8f26d05 100644 (file)
@@ -1235,8 +1235,9 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit,
 
        // if the first character is a separator, and we are in RTL
        // text, this character will not be painted on screen
-       // and thus we should not count it and skip to the next.
-       if (rtl && par.isSeparator(bidi.vis2log(vc)))
+       // and thus we should not count it and skip to the next. Only
+       // in freespacing paragraphs, this first character is painted.
+       if (!par.isFreeSpacing() && par.isSeparator(bidi.vis2log(vc)))
                ++vc;
 
        while (vc < end && tmpx <= x) {