aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2018-03-22 15:02:38 +1100
committerZufu Liu <unknown>2018-03-22 15:02:38 +1100
commitff707f0fe276677a4d89633ae4964e8b94712ca3 (patch)
tree103d8741341108a8dc04ef59923e19da6f4a64e4 /gtk/PlatGTK.cxx
parent9e4cdff7752304fff978ab7f606b64ea85310baf (diff)
downloadscintilla-mirror-ff707f0fe276677a4d89633ae4964e8b94712ca3.tar.gz
Feature [feature-requests:#1211]. Use pre-computed table for UTF8BytesOfLead.
Friendlier treatment of invalid UTF-8. Add tests for UniConversion handling invalid UTF-8. Simplify UTF8Classify tests.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r--gtk/PlatGTK.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index ebedc6e93..da04bae61 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -781,7 +781,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION
positions[i++] = iti.position - (places - place) * iti.distance / places;
positionsCalculated++;
}
- clusterStart += UTF8CharLength(static_cast<unsigned char>(utfForm.c_str()[clusterStart]));
+ clusterStart += UTF8BytesOfLead[static_cast<unsigned char>(utfForm.c_str()[clusterStart])];
place++;
}
}