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

shell32/autocomplete: Don't autocomplete at all on most control characters.

Most control characters sent via some CTRL+key combination should not autocomplete at all. ^C is one example, where just copying some text should not show the auto-suggestion box (if not visible). ^V is another example, where it is already handled in WM_PASTE, so it has to be a no-op here, else auto-append from WM_PASTE would complete the text and then the ^V autocompletion would remove every other suggestion in the listbox. 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 f1be5c78
......@@ -359,6 +359,10 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
return ACEditSubclassProc_KeyDown(This, hwnd, uMsg, wParam, lParam);
case WM_CHAR:
case WM_UNICHAR:
/* Don't autocomplete at all on most control characters */
if (iscntrlW(wParam) && !(wParam >= '\b' && wParam <= '\r'))
break;
ret = CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
autocomplete_text(This, hwnd, (This->options & ACO_AUTOAPPEND) && wParam >= ' '
? autoappend_flag_yes : autoappend_flag_no);
......
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