Commit cb8bd825 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 47ab4904
...@@ -296,7 +296,7 @@ static LRESULT ACEditSubclassProc_KeyDown(IAutoCompleteImpl *ac, HWND hwnd, UINT ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment