From 225bcf92df883126492ca04c432b36091dbaea18 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 29 Apr 2012 22:46:49 +0200 Subject: [PATCH] Indicate that this rtl variable is only valid on the last row Otherwise the variable might be used incorrectly as in [0a137e31/lyxgit]. --- src/TextMetrics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 6c32ee4dc6..a60d4de31b 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1231,7 +1231,7 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit, // If lastrow is false, we don't need to compute // the value of rtl. - bool const rtl = lastrow ? text_->isRTL(par) : false; + bool const rtl_on_lastrow = 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 @@ -1267,8 +1267,8 @@ pos_type TextMetrics::getColumnNearX(pit_type const pit, boundary = false; if (lastrow && - ((rtl && left_side && vc == row.pos() && x < tmpx - 5) || - (!rtl && !left_side && vc == end && x > tmpx + 5))) { + ((rtl_on_lastrow && left_side && vc == row.pos() && x < tmpx - 5) || + (!rtl_on_lastrow && !left_side && vc == end && x > tmpx + 5))) { if (!par.isNewline(end - 1)) c = end; } else if (vc == row.pos()) { -- 2.39.2