aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2004-09-27 13:24:18 +0000
committernyamatongwe <devnull@localhost>2004-09-27 13:24:18 +0000
commitc037839306aa07ce2bf0caba0dfd987e7e546928 (patch)
tree5669f5221926397ef02e7d939ffcd165bf4235e9
parent9d6532e6ab33f01d51b1b452cb44edb3ab0bedd3 (diff)
downloadscintilla-mirror-c037839306aa07ce2bf0caba0dfd987e7e546928.tar.gz
Fix for bug 1025190 where a whole word find would match on
a word at the end of the file despite the word having an additional non-matching letter.
-rw-r--r--src/Document.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index a8cca8a00..76fa456cc 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -884,7 +884,7 @@ bool Document::IsWordStartAt(int pos) {
* the next character is of a different character class.
*/
bool Document::IsWordEndAt(int pos) {
- if (pos < Length() - 1) {
+ if (pos < Length()) {
charClassification ccPrev = WordCharClass(CharAt(pos-1));
return (ccPrev == ccWord || ccPrev == ccPunctuation) &&
(ccPrev != WordCharClass(CharAt(pos)));