diff options
author | nyamatongwe <unknown> | 2003-07-26 13:04:26 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-07-26 13:04:26 +0000 |
commit | fb069bf5696a93a4ace97d39f6876c44bc92fc4b (patch) | |
tree | 721bece653f6b5dcd7141f8883cc9e7c0be95749 | |
parent | f63bc9525fca0390bdbd31e03c9343a9eae8d49c (diff) | |
download | scintilla-mirror-fb069bf5696a93a4ace97d39f6876c44bc92fc4b.tar.gz |
Fix to make backwards regular expression searches not skip over text.
-rw-r--r-- | src/Document.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 51d52b388..487262f8a 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -926,7 +926,7 @@ long Document::FindText(int minPos, int maxPos, const char *s, if (line == lineRangeStart) { if ((startPos != endOfLine) && (searchEnd == '$')) continue; // Can't match end of line if start position before end of line - endOfLine = startPos; + endOfLine = startPos+1; } } @@ -938,10 +938,10 @@ long Document::FindText(int minPos, int maxPos, const char *s, if (increment == -1) { // Check for the last match on this line. int repetitions = 1000; // Break out of infinite loop - while (success && (pre->eopat[0] < endOfLine) && (repetitions--)) { - success = pre->Execute(di, pre->eopat[0], endOfLine); + while (success && (pre->eopat[0] <= (endOfLine+1)) && (repetitions--)) { + success = pre->Execute(di, pos+1, endOfLine+1); if (success) { - if (pre->eopat[0] <= minPos) { + if (pre->eopat[0] <= (minPos+1)) { pos = pre->bopat[0]; lenRet = pre->eopat[0] - pre->bopat[0]; } else { |