diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 56b6c6adbe..a15d63e299 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -1320,7 +1320,13 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, break; } - case TVN_ENDLABELEDITA: return TRUE; + case TVN_ENDLABELEDITA: + { + NMTVDISPINFOA *disp = (NMTVDISPINFOA *)lParam; + if (disp->item.mask & TVIF_TEXT) + ok(disp->item.cchTextMax == 260, "cchTextMax is %d\n", disp->item.cchTextMax); + return TRUE; + } case TVN_ITEMEXPANDINGA: { UINT newmask = pTreeView->itemNew.mask & ~TVIF_CHILDREN; diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 3c73964304..afe16a0f21 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -4017,7 +4017,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel) tvdi.item.mask = TVIF_TEXT; tvdi.item.pszText = tmpText; - tvdi.item.cchTextMax = iLength + 1; + tvdi.item.cchTextMax = TEXT_CALLBACK_SIZE; } else {