Remove obsolete logic with wholeword and MarkAll
Fix #9803, close #9810
This commit is contained in:
parent
85aaef2fba
commit
8339de66d2
|
@ -1267,12 +1267,12 @@ void Notepad_plus::command(int id)
|
|||
{
|
||||
if (lstrlen(wordOnCaret) > 0)
|
||||
{
|
||||
_findReplaceDlg.markAll(wordOnCaret, styleID, true);
|
||||
_findReplaceDlg.markAll(wordOnCaret, styleID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_findReplaceDlg.markAll(selectedText, styleID, lstrlen(selectedText) == lstrlen(wordOnCaret));
|
||||
_findReplaceDlg.markAll(selectedText, styleID);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -2062,17 +2062,13 @@ bool FindReplaceDlg::processReplace(const TCHAR *txt2find, const TCHAR *txt2repl
|
|||
|
||||
|
||||
|
||||
int FindReplaceDlg::markAll(const TCHAR *txt2find, int styleID, bool isWholeWordSelected)
|
||||
int FindReplaceDlg::markAll(const TCHAR *txt2find, int styleID)
|
||||
{
|
||||
const NppGUI& nppGUI = NppParameters::getInstance().getNppGUI();
|
||||
FindOption markAllOpt;
|
||||
|
||||
markAllOpt._isMatchCase = nppGUI._markAllCaseSensitive;
|
||||
|
||||
// if whole word is selected for being colorized, isWholeWord setting in Preferences will be checked
|
||||
// otherwise this option is false, because user may want to find the words contain the parts to search
|
||||
markAllOpt._isWholeWord = isWholeWordSelected ? nppGUI._markAllWordOnly : false;
|
||||
|
||||
markAllOpt._isWholeWord = nppGUI._markAllWordOnly;
|
||||
markAllOpt._str2Search = txt2find;
|
||||
|
||||
int nbFound = processAll(ProcessMarkAllExt, &markAllOpt, true, NULL, styleID);
|
||||
|
|
|
@ -249,7 +249,7 @@ public :
|
|||
bool processFindNext(const TCHAR *txt2find, const FindOption *options = NULL, FindStatus *oFindStatus = NULL, FindNextType findNextType = FINDNEXTTYPE_FINDNEXT);
|
||||
bool processReplace(const TCHAR *txt2find, const TCHAR *txt2replace, const FindOption *options = NULL);
|
||||
|
||||
int markAll(const TCHAR *txt2find, int styleID, bool isWholeWordSelected);
|
||||
int markAll(const TCHAR *txt2find, int styleID);
|
||||
int markAllInc(const FindOption *opt);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue