Commit 4b7300ef authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

user32: Respect rev for painting selections.

parent 1cde966c
...@@ -2136,10 +2136,10 @@ static INT EDIT_PaintText(EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col ...@@ -2136,10 +2136,10 @@ static INT EDIT_PaintText(EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col
*/ */
static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev)
{ {
INT s; INT s = 0;
INT e; INT e = 0;
INT li; INT li = 0;
INT ll; INT ll = 0;
INT x; INT x;
INT y; INT y;
LRESULT pos; LRESULT pos;
...@@ -2185,12 +2185,16 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) ...@@ -2185,12 +2185,16 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev)
x += es->format_rect.left; x += es->format_rect.left;
} }
li = EDIT_EM_LineIndex(es, line); if (rev)
ll = EDIT_EM_LineLength(es, li); {
s = min(es->selection_start, es->selection_end); li = EDIT_EM_LineIndex(es, line);
e = max(es->selection_start, es->selection_end); ll = EDIT_EM_LineLength(es, li);
s = min(li + ll, max(li, s)); s = min(es->selection_start, es->selection_end);
e = min(li + ll, max(li, e)); e = max(es->selection_start, es->selection_end);
s = min(li + ll, max(li, s));
e = min(li + ll, max(li, e));
}
if (ssa) if (ssa)
ScriptStringOut(ssa, x, y, 0, &es->format_rect, s - li, e - li, FALSE); ScriptStringOut(ssa, x, y, 0, &es->format_rect, s - li, e - li, FALSE);
else if (rev && (s != e) && else if (rev && (s != e) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment