The displayed width of a space on-screen is taken from the wrong
position in the row... but only for RtL text. And thus the row display
is messed up if it contains spaces. Patch fixes this.

I believe this to be correct, but please test. Bug and patch are in
bugzilla: bug 2029.

- Martin

Index: rowpainter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v
retrieving revision 1.155
diff -u -p -r1.155 rowpainter.C
--- rowpainter.C        7 Sep 2005 10:37:00 -0000       1.155
+++ rowpainter.C        16 Sep 2005 14:38:37 -0000
@@ -627,7 +627,7 @@ void RowPainter::paintText()
                }
 
                const int width_pos =
-                       text_.singleWidth(par_, vpos, par_.getChar(vpos), font);
+                       text_.singleWidth(par_, pos, par_.getChar(pos), font);
 
                if (x_ + width_pos < 0) {
                        x_ += width_pos;

Reply via email to