=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: shell32/autocomplete: Don' t auto-append unless the caret is at the end.
Alexandre Julliard
julliard at winehq.org
Thu Sep 27 18:25:13 CDT 2018
Module: wine
Branch: master
Commit: 3f31afafc32bf2dc009bf037852e58298354e18b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3f31afafc32bf2dc009bf037852e58298354e18b
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Thu Sep 27 00:35:22 2018 +0300
shell32/autocomplete: Don't auto-append unless the caret is at the end.
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 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 9acd3f4..621c5fd 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -136,9 +136,15 @@ static size_t format_quick_complete(WCHAR *dst, const WCHAR *qc, const WCHAR *st
static void autoappend_str(IAutoCompleteImpl *ac, WCHAR *text, UINT len, WCHAR *str, HWND hwnd)
{
+ DWORD sel_start;
WCHAR *tmp;
size_t size;
+ /* Don't auto-append unless the caret is at the end */
+ SendMessageW(hwnd, EM_GETSEL, (WPARAM)&sel_start, 0);
+ if (sel_start != len)
+ return;
+
/* The character capitalization can be different,
so merge text and str into a new string */
size = len + strlenW(&str[len]) + 1;
More information about the wine-cvs
mailing list