aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-02-08 00:10:13 +0000
committernyamatongwe <devnull@localhost>2005-02-08 00:10:13 +0000
commiteefc175226ec466e42b820e00a318cbc34bfafdd (patch)
treecec67e5d8ac77de1b1aa2596eaff071f0ed9cd52 /src
parente5e338800d4ff687f559ce4ecfc6364ca07a9d1b (diff)
downloadscintilla-mirror-eefc175226ec466e42b820e00a318cbc34bfafdd.tar.gz
Patch from Josiah Reynolds to avoid matches of line end
characters.
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 87a101822..6659f4f0c 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1005,7 +1005,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+1;
+ endOfLine = startPos;
}
}
@@ -1017,10 +1017,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+1)) && (repetitions--)) {
- success = pre->Execute(di, pos+1, endOfLine+1);
+ while (success && (pre->eopat[0] <= endOfLine) && (repetitions--)) {
+ success = pre->Execute(di, pos+1, endOfLine);
if (success) {
- if (pre->eopat[0] <= (minPos+1)) {
+ if (pre->eopat[0] <= minPos) {
pos = pre->bopat[0];
lenRet = pre->eopat[0] - pre->bopat[0];
} else {