From 1e79a7c53fbfd7481e26f92037de92597dedaf79 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Mon, 17 Jun 2019 08:49:43 +1000 Subject: Feature [feature-requests:#1293]. InsertCharacter replaces AddCharUTF. --- cocoa/ScintillaCocoa.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cocoa') diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 9a507e55c..8271e7988 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -2187,11 +2187,11 @@ ptrdiff_t ScintillaCocoa::InsertText(NSString *input) { while (sv.length()) { const unsigned char leadByte = sv[0]; const unsigned int bytesInCharacter = UTF8BytesOfLead[leadByte]; - AddCharUTF(sv.data(), bytesInCharacter, false); + InsertCharacter(sv.substr(0, bytesInCharacter)); sv.remove_prefix(bytesInCharacter); } } else { - AddCharUTF(encoded.c_str(), static_cast(encoded.length()), false); + InsertCharacter(encoded); } } return encoded.length(); -- cgit v1.2.3