aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authormitchell <unknown>2018-05-05 11:52:27 -0400
committermitchell <unknown>2018-05-05 11:52:27 -0400
commit93462d87c3c8f398d5900be84349f29cb088d849 (patch)
tree631eb19ad8d818e262f4988139d96709b4ee8cd5 /gtk/PlatGTK.cxx
parent156c3f0e53ea2a7f932f6079cb122c2cf66fb3df (diff)
downloadscintilla-mirror-93462d87c3c8f398d5900be84349f29cb088d849.tar.gz
Backport: 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. Backport of changeset 6643:ebbb4e5aaf93.
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++;
}
}