[PATCH v2 1/8] shell32/autocomplete: Fix going up through the suggestion listbox
Gabriel Ivăncescu
gabrielopcode at gmail.com
Thu Sep 20 06:55:34 CDT 2018
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 at gmail.com>
---
This series supersedes patches from 150637 to 150639.
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);
--
1.9.1
More information about the wine-devel
mailing list