diff options
author | Neil <nyamatongwe@gmail.com> | 2021-07-12 19:53:49 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-07-12 19:53:49 +1000 |
commit | fde2846e1049f597f19199bcf45591275a3de6a9 (patch) | |
tree | ea7d8e2f77994072123341c508705eceae7c9536 /src | |
parent | df13d190bcd390ff6dc2ef2ef2802c1fa9916f6a (diff) | |
download | scintilla-mirror-fde2846e1049f597f19199bcf45591275a3de6a9.tar.gz |
Optimize case-insensitive DBCS search.
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 2 |
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; } |