diff options
author | nyamatongwe <unknown> | 2011-02-10 09:42:29 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-02-10 09:42:29 +1100 |
commit | f1cc26a3403508ce34c07c3975f2acb677c08e19 (patch) | |
tree | 92f6efa04fe4d5c8c1b14feed77ed8d1f3dbcce9 | |
parent | 35416671e58c4ffc5b235330bcdefb86680f4d13 (diff) | |
download | scintilla-mirror-f1cc26a3403508ce34c07c3975f2acb677c08e19.tar.gz |
Fix for backwards case-insensitive search in code page 936. Bug #3176271.
Was not finding each occurance of a given string due to misaligned
character access.
-rw-r--r-- | src/Document.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 91a0dda14..c0290936f 100644 --- a/src/Document.cxx +++ b/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; |