diff options
author | Zufu Liu <unknown> | 2019-06-17 08:49:43 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2019-06-17 08:49:43 +1000 |
commit | 1e79a7c53fbfd7481e26f92037de92597dedaf79 (patch) | |
tree | 7ea049531f97b9bba03c23f28555563480cee58c /cocoa/ScintillaCocoa.mm | |
parent | a82f89692231c7bd44b1dab9f4343836bbf1fa54 (diff) | |
download | scintilla-mirror-1e79a7c53fbfd7481e26f92037de92597dedaf79.tar.gz |
Feature [feature-requests:#1293]. InsertCharacter replaces AddCharUTF.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 4 |
1 files changed, 2 insertions, 2 deletions
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<unsigned int>(encoded.length()), false); + InsertCharacter(encoded); } } return encoded.length(); |