From d187be8205a45797b023005e9a99485c5e8028f6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 28 Jan 2014 11:04:31 +0100 Subject: [PATCH] Do not skip space at start of row (fixes #8947, #8838) TextMetrics::getColumnNearX (x -> pos translation) has special code to ignore spaces at the beginning of a row, but neither the display code nor TextMetrics::cursorX (pos->x translation) follow this logic. One might argue that spaces should actually be ignored (like LaTeX does), but this leads to UI issues and is probably too difficult to implement. (cherry picked from commit bab58480bc32323c6124c02bdf086b5de1843df0) --- src/TextMetrics.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 8831ae9384..eac75b16f6 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1245,13 +1245,6 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit, // the value of rtl. bool const rtl = lastrow ? text_->isRTL(par) : false; - // 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. Only - // in freespacing paragraphs, this first character is painted. - if (!par.isFreeSpacing() && par.isSeparator(bidi.vis2log(vc))) - ++vc; - while (vc < end && tmpx <= x) { c = bidi.vis2log(vc); last_tmpx = tmpx; -- 2.39.5