[BUG_FIXED] (Author: Dave Brotherstone) Fix incremental search regression.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1013 f5eea248-9336-0410-98b8-ebc06183d4e3remotes/trunk
parent
d60466eed3
commit
300343011c
|
@ -1223,12 +1223,6 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op
|
|||
// the text to find is modified so use the current position
|
||||
startPosition = cr.cpMin;
|
||||
endPosition = docLength;
|
||||
}
|
||||
else if (NextIncremental==pOptions->_incrementalType)
|
||||
{
|
||||
// text to find is not modified, so use current position +1
|
||||
startPosition = cr.cpMin;
|
||||
endPosition = docLength;
|
||||
|
||||
if (pOptions->_whichDirection == DIR_UP)
|
||||
{
|
||||
|
@ -1237,6 +1231,19 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op
|
|||
endPosition = 0;
|
||||
}
|
||||
}
|
||||
else if (NextIncremental==pOptions->_incrementalType)
|
||||
{
|
||||
// text to find is not modified, so use current position +1
|
||||
startPosition = cr.cpMin + 1;
|
||||
endPosition = docLength;
|
||||
|
||||
if (pOptions->_whichDirection == DIR_UP)
|
||||
{
|
||||
//When searching upwards, start is the lower part, end the upper, for backwards search
|
||||
startPosition = cr.cpMax - 1;
|
||||
endPosition = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int flags = Searching::buildSearchFlags(pOptions);
|
||||
switch (findNextType)
|
||||
|
@ -1360,7 +1367,7 @@ bool FindReplaceDlg::processReplace(const TCHAR *txt2find, const TCHAR *txt2repl
|
|||
return false;
|
||||
|
||||
FindOption replaceOptions = options ? *options : *_env;
|
||||
replaceOptions._incrementalType = NextIncremental;
|
||||
replaceOptions._incrementalType = FirstIncremental;
|
||||
|
||||
if ((*_ppEditView)->getCurrentBuffer()->isReadOnly()) return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue