mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix bidi bugs 1965, 1970
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10396 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
24355f90da
commit
a91f7512b2
@ -1,3 +1,11 @@
|
||||
|
||||
2005-08-02 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* text.C (cursorX): fix bug 1965: cursor movement at
|
||||
line end broken in RtL.
|
||||
(drawSelection): fix bug 1970: drawing of single-line
|
||||
selection broken for RtL.
|
||||
|
||||
2005-07-31 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
bug 465.
|
||||
|
12
src/text.C
12
src/text.C
@ -1898,12 +1898,13 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
|
||||
X2 = !isRTL(par2) ? endx : 0 + dim_.wid;
|
||||
}
|
||||
|
||||
if (!above && !below && &par1.getRow(beg.pos(), end.boundary())
|
||||
if (!above && !below && &par1.getRow(beg.pos(), beg.boundary())
|
||||
== &par2.getRow(end.pos(), end.boundary()))
|
||||
{
|
||||
// paint only one rectangle
|
||||
pi.pain.fillRectangle(x + x1, y1, X2 - x1, y2 - y1,
|
||||
LColor::selection);
|
||||
int const b( !isRTL(par1) ? x + x1 : x + X1 );
|
||||
int const w( !isRTL(par1) ? X2 - x1 : x2 - X1 );
|
||||
pi.pain.fillRectangle(b, y1, w, y2 - y1, LColor::selection);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2129,7 +2130,10 @@ int LyXText::cursorX(CursorSlice const & sl, bool boundary) const
|
||||
|
||||
// see correction above
|
||||
if (boundary_correction)
|
||||
x += singleWidth(par, ppos);
|
||||
if (getFont(par, ppos).isRightToLeft())
|
||||
x -= singleWidth(par, ppos);
|
||||
else
|
||||
x += singleWidth(par, ppos);
|
||||
|
||||
return int(x);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user