mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
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.
This commit is contained in:
parent
782ea74acc
commit
1a2ccfe9c7
1 changed files with 2 additions and 1 deletions
|
@ -115,7 +115,8 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
|
||||||
WCHAR *text = p->member.run.strText->szData + len - 1;
|
WCHAR *text = p->member.run.strText->szData + len - 1;
|
||||||
|
|
||||||
assert (len);
|
assert (len);
|
||||||
while (len && *(text--) == ' ')
|
if (~p->member.run.nFlags & MERF_GRAPHICS)
|
||||||
|
while (len && *(text--) == ' ')
|
||||||
len--;
|
len--;
|
||||||
if (len)
|
if (len)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue