Commit 101c8ca5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/comboex: Reduce variable scope.

parent 0d01212d
......@@ -1741,7 +1741,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
case WM_KEYDOWN: {
INT_PTR oldItem, selected, step = 1;
INT_PTR oldItem, selected;
CBE_ITEMDATA *item;
switch ((INT)wParam)
......@@ -1851,13 +1851,15 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
break;
case VK_UP:
step = -1;
case VK_DOWN:
/* by default, step is 1 */
{
INT step = wParam == VK_DOWN ? 1 : -1;
oldItem = SendMessageW (infoPtr->hwndSelf, CB_GETCURSEL, 0, 0);
if (oldItem >= 0 && oldItem + step >= 0)
SendMessageW (infoPtr->hwndSelf, CB_SETCURSEL, oldItem + step, 0);
return 0;
}
default:
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
}
......
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