*ide: Fixed Replace issue

git-svn-id: svn://ultimatepp.org/upp/trunk@2396 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-05-14 13:28:30 +00:00
parent 2eac4aec79
commit d80963ce5d
2 changed files with 4 additions and 4 deletions

View file

@ -421,7 +421,7 @@ public:
void FindReplace(bool pick_selection, bool pick_text, bool replace);
bool Find(bool back, const wchar *text, bool wholeword, bool ignorecase, bool wildcards,
bool block);
bool Find(bool back = false, bool blockreplace = false);
bool Find(bool back = false, bool blockreplace = false, bool replace = false);
bool GetStringRange(int cursor, int& b, int &e) const;
bool GetStringRange(int& b, int &e) const { return GetStringRange(GetCursor(), b, e); }
bool FindString(bool back);

View file

@ -213,7 +213,7 @@ void CodeEditor::FindReplaceAddHistory()
findreplace.replace.AddHistory();
}
bool CodeEditor::Find(bool back, bool blockreplace)
bool CodeEditor::Find(bool back, bool blockreplace, bool replace)
{
FindReplaceAddHistory();
if(Find(back, (WString)~findreplace.find, findreplace.wholeword,
@ -221,7 +221,7 @@ bool CodeEditor::Find(bool back, bool blockreplace)
if(!blockreplace) {
if(!findreplace.IsOpen()) {
findreplace.NoCenter();
OpenNormalFindReplace(false);
OpenNormalFindReplace(replace);
}
Rect lr = GetLineScreenRect(GetLine(GetCursor()));
Size fsz = findreplace.GetAdjustedSize();
@ -323,7 +323,7 @@ void CodeEditor::Replace()
if(!found) return;
if(RemoveSelection()) {
Paste(GetReplaceText());
Find();
Find(false, false, true);
}
}