[PATCH v7 3/7] shell32/autocomplete: Don't auto-append on control characters, except for ^V (paste)

Huw Davies huw at codeweavers.com
Tue Sep 18 07:24:38 CDT 2018


On Mon, Sep 17, 2018 at 10:23:11PM +0300, Gabriel Ivăncescu wrote:
> We must not auto-append on control characters, most notably Backspace, but
> also ^X (cut) and so on. An exception is ^V, which auto-appends on Windows,
> so this is needed to match Windows behavior (also needed when receiving
> the ^V message directly).
> 
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
>  dlls/shell32/autocomplete.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
> index 183b37b..429b4fb 100644
> --- a/dlls/shell32/autocomplete.c
> +++ b/dlls/shell32/autocomplete.c
> @@ -343,7 +343,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
>          case WM_CHAR:
>          case WM_UNICHAR:
>              ret = CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
> -            autocomplete_text(This, hwnd, (This->options & ACO_AUTOAPPEND)
> +            autocomplete_text(This, hwnd, (This->options & ACO_AUTOAPPEND) &&
> +                                          (wParam >= ' ' || wParam == 0x16 /* ^V (paste) */)
>                                            ? autoappend_flag_yes : autoappend_flag_no);

Let's leave the ^V out of this.



More information about the wine-devel mailing list