On Tue, Sep 18, 2018 at 12:17 PM, Huw Davies huw@codeweavers.com wrote:
On Windows 7 auto-append behaves the same whether paste is driven by a WM_PASTE or a ^V. So you will at least need to handle WM_PASTE, which makes the ^V exclusion dubious.
Yes, I will handle WM_PASTE in the next patch series, I wanted to get these committed first. They're separate fixes, anyway. At least the wParam >= ' ' would have to remain.
Ok, this part does seem to be necessary and if it turns out you do need to keep the ^V exception after handling WM_PASTE, then it'll have to move to a small helper function.
Huw.
I don't think there's a need for a helper function, since the WM_PASTE handler will be very small and basically just a "forward it to the edit control then call autocomplete_text". I've already have it written but I didn't send it because I wanted to have these committed first before I bring new patches in, and besides the previous code did not handle WM_PASTE anyway so it's an extra functionality, not a regression. The reason there's no need for helper function is because this is what it is:
+ case WM_PASTE: + ret = CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + autocomplete_text(This, hwnd, autoappend_flag_yes); + return ret;
in a later patch.
I guess I can remove the ^V if you really want to and keep the wParam
= ' ', would that be acceptable? I don't know what Windows does if it
hijacks WM_PASTE but not ^V, but honestly it doesn't really matter anymore.
I know I already sent the v7 patch with the ^V split off from patch 2, but you can review or sign-off on the rest of the patches, as they don't depend on it, so I don't have to resend them again. Then I can just resend patch 3 and have it only check for ' ', if you really want to, and get rid of the ^V hack. (WM_PASTE will come later, it's not like it's a big deal to not auto-append on a paste yet!)