aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r--cocoa/ScintillaView.mm1
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];