shell32/autocomplete: Really append suggested part instead of replacing whole string.
This commit is contained in:
parent
2210e9bbf0
commit
5354b974a1
|
@ -486,7 +486,7 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
}
|
}
|
||||||
return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
|
return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
|
||||||
case WM_KEYUP:
|
case WM_KEYUP:
|
||||||
GetWindowTextW( hwnd, hwndText, 255);
|
GetWindowTextW( hwnd, hwndText, sizeof(hwndText)/sizeof(WCHAR));
|
||||||
|
|
||||||
switch(wParam) {
|
switch(wParam) {
|
||||||
case VK_RETURN:
|
case VK_RETURN:
|
||||||
|
@ -591,11 +591,16 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
|
|
||||||
if (StrStrIW(strs, hwndText) == strs) {
|
if (StrStrIW(strs, hwndText) == strs) {
|
||||||
if (!filled && (This->options & ACO_AUTOAPPEND)) {
|
if (!filled && (This->options & ACO_AUTOAPPEND)) {
|
||||||
SetWindowTextW(hwnd, strs);
|
INT typed_length = strlenW(hwndText);
|
||||||
SendMessageW(hwnd, EM_SETSEL, lstrlenW(hwndText), lstrlenW(strs));
|
WCHAR buffW[255];
|
||||||
|
|
||||||
|
strcpyW(buffW, hwndText);
|
||||||
|
strcatW(buffW, &strs[typed_length]);
|
||||||
|
SetWindowTextW(hwnd, buffW);
|
||||||
|
SendMessageW(hwnd, EM_SETSEL, typed_length, strlenW(strs));
|
||||||
if (!(This->options & ACO_AUTOSUGGEST))
|
if (!(This->options & ACO_AUTOSUGGEST))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (This->options & ACO_AUTOSUGGEST) {
|
if (This->options & ACO_AUTOSUGGEST) {
|
||||||
SendMessageW(This->hwndListBox, LB_ADDSTRING, 0, (LPARAM)strs);
|
SendMessageW(This->hwndListBox, LB_ADDSTRING, 0, (LPARAM)strs);
|
||||||
|
|
Loading…
Reference in New Issue