From 682b03731cb8139f3e1b3e143c1841a03ee19e84 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 1 Dec 2011 20:30:16 +0100 Subject: [PATCH] comctl32: Fix text wrapping in syslink when an item starts in the middle of a line. --- dlls/comctl32/syslink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 823c7acab96..42fb9871892 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -606,7 +606,7 @@ static PDOC_ITEM SYSLINK_GetPrevLink (const SYSLINK_INFO *infoPtr, PDOC_ITEM Cur * SYSLINK_WrapLine * Tries to wrap a line. */ -static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int *LineLen, +static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int x, int *LineLen, int nFit, LPSIZE Extent) { int i; @@ -625,7 +625,7 @@ static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int *LineLen, { Extent->cx = 0; Extent->cy = 0; - i = max( nFit, 1 ); + if (x == SL_LEFTMARGIN) i = max( nFit, 1 ); } } *LineLen = i; @@ -722,7 +722,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect) if(n != 0) { - Wrap = SYSLINK_WrapLine(tx, infoPtr->BreakChar, &LineLen, nFit, &szDim); + Wrap = SYSLINK_WrapLine(tx, infoPtr->BreakChar, x, &LineLen, nFit, &szDim); if(LineLen == 0) {