Module: wine Branch: master Commit: c5d38ce42778726c7a243520e015d38d0bebc160 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5d38ce42778726c7a243520e0...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Mon May 22 13:03:01 2017 +0000
regedit: Re-select the listview item after renaming is complete.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/regedit/listview.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c index d8589b8..a78a406 100644 --- a/programs/regedit/listview.c +++ b/programs/regedit/listview.c @@ -400,11 +400,16 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR LPNMLVDISPINFOW dispInfo = (LPNMLVDISPINFOW)lParam; LPWSTR oldName = GetItemText(hWnd, dispInfo->item.iItem); LONG ret; + LVITEMW item; + if (!oldName) return -1; /* cannot rename a default value */ ret = RenameValue(hWnd, g_currentRootKey, g_currentPath, oldName, dispInfo->item.pszText); if (ret) { RefreshListView(hWnd, g_currentRootKey, g_currentPath, dispInfo->item.pszText); + item.state = LVIS_FOCUSED | LVIS_SELECTED; + item.stateMask = LVIS_FOCUSED | LVIS_SELECTED; + SendMessageW(hWnd, LVM_SETITEMSTATE, dispInfo->item.iItem, (LPARAM)&item); } HeapFree(GetProcessHeap(), 0, oldName); return 0;