Gabriel Ivăncescu : shell32/autocomplete: Fix going up through the suggestion listbox.
Module: wine Branch: master Commit: cb8bd825b99478393efad5907236f1bcd9dc799e URL: https://source.winehq.org/git/wine.git/?a=commit;h=cb8bd825b99478393efad5907... Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Sep 20 14:55:34 2018 +0300 shell32/autocomplete: Fix going up through the suggestion listbox. When going up past the topmost item in the listbox, go through txtbackup first before wrapping around, just like when going down. This matches Windows behavior. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/autocomplete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c index e3fe1fd..0471146 100644 --- a/dlls/shell32/autocomplete.c +++ b/dlls/shell32/autocomplete.c @@ -296,7 +296,7 @@ static LRESULT ACEditSubclassProc_KeyDown(IAutoCompleteImpl *ac, HWND hwnd, UINT /* Change the selection */ sel = SendMessageW(ac->hwndListBox, LB_GETCURSEL, 0, 0); if (wParam == VK_UP) - sel = ((sel - 1) < 0) ? count - 1 : sel - 1; + sel = ((sel - 1) < -1) ? count - 1 : sel - 1; else sel = ((sel + 1) >= count) ? -1 : sel + 1; SendMessageW(ac->hwndListBox, LB_SETCURSEL, sel, 0);
participants (1)
-
Alexandre Julliard