diff options
author | Neil <nyamatongwe@gmail.com> | 2017-03-02 09:41:01 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-03-02 09:41:01 +1100 |
commit | 14c9bcc7dc7d5a8577136baad5b43c6bc311312d (patch) | |
tree | 4e842ee9bb84c731c37ae9ea5844c6cf5c8ecad2 /cocoa/ScintillaView.mm | |
parent | e15a9f49e1c9224d1c81bc5ef1c14f008ee2d87c (diff) | |
download | scintilla-mirror-14c9bcc7dc7d5a8577136baad5b43c6bc311312d.tar.gz |
Fix potential problems with IME on Cocoa when document contains invalid UTF-8.
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r-- | cocoa/ScintillaView.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 107c421c3..61c471d6a 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -437,6 +437,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) [mOwner message: SCI_SETTARGETRANGE wParam: posRange.location lParam: NSMaxRange(posRange)]; std::string text([mOwner message: SCI_TARGETASUTF8] + 1, 0); [mOwner message: SCI_TARGETASUTF8 wParam: 0 lParam: reinterpret_cast<sptr_t>(&text[0])]; + text = FixInvalidUTF8(text); NSString *result = [NSString stringWithUTF8String: text.c_str()]; NSMutableAttributedString *asResult = [[[NSMutableAttributedString alloc] initWithString:result] autorelease]; |