mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
[BROWSEUI] Remove '\1' from AutoComplete list (#3264)
Delete "backslash one" (indicates SW_ values) from auto-completion list. CORE-9281
This commit is contained in:
parent
0689455bb3
commit
957d07436b
1 changed files with 12 additions and 2 deletions
|
@ -33,12 +33,22 @@ STDMETHODIMP CACLCustomMRU::Next(ULONG celt, LPWSTR *rgelt, ULONG *pceltFetched)
|
||||||
if (INT(m_ielt) >= m_MRUData.GetSize())
|
if (INT(m_ielt) >= m_MRUData.GetSize())
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
|
||||||
size_t cb = (m_MRUData[m_ielt].GetLength() + 1) * sizeof(WCHAR);
|
CStringW str = m_MRUData[m_ielt];
|
||||||
|
|
||||||
|
if (!m_bTypedURLs)
|
||||||
|
{
|
||||||
|
// Erase the last "\\1" etc. (indicates SW_* value)
|
||||||
|
INT ich = str.ReverseFind(L'\\');
|
||||||
|
if (ich >= 0)
|
||||||
|
str = str.Left(ich);
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t cb = (str.GetLength() + 1) * sizeof(WCHAR);
|
||||||
LPWSTR psz = (LPWSTR)CoTaskMemAlloc(cb);
|
LPWSTR psz = (LPWSTR)CoTaskMemAlloc(cb);
|
||||||
if (!psz)
|
if (!psz)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
|
||||||
CopyMemory(psz, (LPCWSTR)m_MRUData[m_ielt], cb);
|
CopyMemory(psz, (LPCWSTR)str, cb);
|
||||||
*rgelt = psz;
|
*rgelt = psz;
|
||||||
*pceltFetched = 1;
|
*pceltFetched = 1;
|
||||||
++m_ielt;
|
++m_ielt;
|
||||||
|
|
Loading…
Reference in a new issue