Merge pull request #7 from andreas-jonsson/find_ampersands

Fix ampersands in find dialog status bar.
pull/81/head^2
Don HO 10 years ago
commit 2fe9845dbe

@ -707,3 +707,13 @@ generic_string stringToUpper(generic_string strToConvert)
return strToConvert;
}
generic_string stringReplace(generic_string subject, const generic_string& search, const generic_string& replace)
{
size_t pos = 0;
while ((pos = subject.find(search, pos)) != std::string::npos)
{
subject.replace(pos, search.length(), replace);
pos += replace.length();
}
return subject;
}

@ -187,5 +187,6 @@ generic_string PathRemoveFileSpec(generic_string & path);
generic_string PathAppend(generic_string &strDest, const generic_string & str2append);
COLORREF getCtrlBgColor(HWND hWnd);
generic_string stringToUpper(generic_string strToConvert);
generic_string stringReplace(generic_string subject, const generic_string& search, const generic_string& replace);
#endif //M30_IDE_COMMUN_H

@ -1275,7 +1275,7 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op
if (NotIncremental == pOptions->_incrementalType) //incremental search doesnt trigger messages
{
generic_string msg = TEXT("Find: Can't find the text \"");
msg += txt2find;
msg += stringReplace(txt2find, TEXT("&"), TEXT("&&"));
msg += TEXT("\"");
setStatusbarMessage(msg, FSNotFound);

Loading…
Cancel
Save