=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: shell32/autocomplete: Fix going up through the suggestion listbox.
Alexandre Julliard
julliard at winehq.org
Fri Sep 21 17:04:30 CDT 2018
Module: wine
Branch: master
Commit: cb8bd825b99478393efad5907236f1bcd9dc799e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cb8bd825b99478393efad5907236f1bcd9dc799e
Author: Gabriel Ivăncescu <gabrielopcode at 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 at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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);
More information about the wine-cvs
mailing list