Commit 1a2ccfe9 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Count graphics towards line width.

Images that are inserted into richedit controls store a space for the text, since that is the character returned when getting the plain text from the control. When calculating the width of a line, the space character is skipped, but images should not be skipped. This can be seen by inserting an image into wordpad on a line by it's own, then centering the line. The image will start from the center rather than being centered in the control.
parent 782ea74a
......@@ -115,7 +115,8 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
WCHAR *text = p->member.run.strText->szData + len - 1;
assert (len);
while (len && *(text--) == ' ')
if (~p->member.run.nFlags & MERF_GRAPHICS)
while (len && *(text--) == ' ')
len--;
if (len)
{
......
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