aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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;
}