aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-07-12 19:53:49 +1000
committerNeil <nyamatongwe@gmail.com>2021-07-12 19:53:49 +1000
commitfde2846e1049f597f19199bcf45591275a3de6a9 (patch)
treeea7d8e2f77994072123341c508705eceae7c9536 /src
parentdf13d190bcd390ff6dc2ef2ef2802c1fa9916f6a (diff)
downloadscintilla-mirror-fde2846e1049f597f19199bcf45591275a3de6a9.tar.gz
Optimize case-insensitive DBCS search.
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 6c68f11ee..3fe2cf8ec 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -2106,7 +2106,7 @@ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, con
while (((pos + indexDocument) < limitPos) &&
(indexSearch < lenSearch)) {
const unsigned char leadByte = cb.UCharAt(pos + indexDocument);
- const int widthChar = IsDBCSLeadByteNoExcept(leadByte) ? 2 : 1;
+ const int widthChar = (!UTF8IsAscii(leadByte) && IsDBCSLeadByteNoExcept(leadByte)) ? 2 : 1;
if (!widthFirstCharacter) {
widthFirstCharacter = widthChar;
}