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@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
47ab490427
commit
cb8bd825b9
|
@ -296,7 +296,7 @@ static LRESULT ACEditSubclassProc_KeyDown(IAutoCompleteImpl *ac, HWND hwnd, UINT
|
||||||
/* Change the selection */
|
/* Change the selection */
|
||||||
sel = SendMessageW(ac->hwndListBox, LB_GETCURSEL, 0, 0);
|
sel = SendMessageW(ac->hwndListBox, LB_GETCURSEL, 0, 0);
|
||||||
if (wParam == VK_UP)
|
if (wParam == VK_UP)
|
||||||
sel = ((sel - 1) < 0) ? count - 1 : sel - 1;
|
sel = ((sel - 1) < -1) ? count - 1 : sel - 1;
|
||||||
else
|
else
|
||||||
sel = ((sel + 1) >= count) ? -1 : sel + 1;
|
sel = ((sel + 1) >= count) ? -1 : sel + 1;
|
||||||
SendMessageW(ac->hwndListBox, LB_SETCURSEL, sel, 0);
|
SendMessageW(ac->hwndListBox, LB_SETCURSEL, sel, 0);
|
||||||
|
|
Loading…
Reference in New Issue