Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/shell32/autocomplete.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 5a31259..22f6ab8 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -608,10 +608,15 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg,
WPARAM wParam,
hide_listbox(This, This->hwndListBox);
return 0;
case WM_KILLFOCUS:
- if ((This->options & ACO_AUTOSUGGEST) && ((HWND)wParam !=
This->hwndListBox))
+ if (This->options & ACO_AUTOSUGGEST)
{
- hide_listbox(This, This->hwndListBox);
+ if ((HWND)wParam == This->hwndListBox) break;
+ ShowWindow(This->hwndListBox, SW_HIDE);
+ SendMessageW(This->hwndListBox, LB_RESETCONTENT, 0, 0);
}
+
+ /* Reset the enumerator if it's not visible anymore */
+ if (!IsWindowVisible(hwnd)) free_enum_strs(This);
break;
case WM_KEYDOWN:
return ACEditSubclassProc_KeyDown(This, hwnd, uMsg, wParam, lParam);
--
1.9.1