summaryrefslogtreecommitdiffstats
path: root/scintilla/src
diff options
context:
space:
mode:
Diffstat (limited to 'scintilla/src')
-rw-r--r--scintilla/src/Document.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx
index 7886a3e..39e0181 100644
--- a/scintilla/src/Document.cxx
+++ b/scintilla/src/Document.cxx
@@ -1309,7 +1309,11 @@ long Document::FindText(int minPos, int maxPos, const char *search,
//Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind);
const int limitPos = Platform::Maximum(startPos, endPos);
- int pos = forward ? startPos : (startPos - 1);
+ int pos = startPos;
+ if (!forward) {
+ // Back all of a character
+ pos = NextPosition(pos, increment);
+ }
if (caseSensitive) {
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
bool found = (pos + lengthFind) <= limitPos;