mirror of
https://github.com/reactos/reactos.git
synced 2024-12-05 09:23:32 +08:00
[SHELL32] Don't smartass-renaming on folders (#3993)
Selection on renaming folders shouldn't select the extension-like part of filename. CORE-17793
This commit is contained in:
parent
db7295f864
commit
5da934e34d
@ -2093,9 +2093,11 @@ LRESULT CDefView::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandl
|
||||
HWND hEdit = reinterpret_cast<HWND>(m_ListView.SendMessage(LVM_GETEDITCONTROL));
|
||||
SHLimitInputEdit(hEdit, m_pSFParent);
|
||||
|
||||
if (!(dwAttr & SFGAO_LINK) && (lpdi->item.mask & LVIF_TEXT) && !SelectExtOnRename())
|
||||
LPWSTR pszText = lpdi->item.pszText;
|
||||
if (!(dwAttr & (SFGAO_LINK | SFGAO_FOLDER)) && (dwAttr & SFGAO_FILESYSTEM) &&
|
||||
(lpdi->item.mask & LVIF_TEXT) &&
|
||||
!SelectExtOnRename() && !SHELL_FS_HideExtension(pszText))
|
||||
{
|
||||
LPWSTR pszText = lpdi->item.pszText;
|
||||
LPWSTR pchDotExt = PathFindExtensionW(pszText);
|
||||
::PostMessageW(hEdit, EM_SETSEL, 0, pchDotExt - pszText);
|
||||
::PostMessageW(hEdit, EM_SCROLLCARET, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user