aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-02-08 00:10:13 +0000
committernyamatongwe <unknown>2005-02-08 00:10:13 +0000
commit85c1f8645c626b914a9f0046dd3f70335ef15dac (patch)
treecec67e5d8ac77de1b1aa2596eaff071f0ed9cd52 /src
parent2c1c49a4376e13fefb01ff4bd1c38615654276d8 (diff)
downloadscintilla-mirror-85c1f8645c626b914a9f0046dd3f70335ef15dac.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 {