diff --git a/README.md b/README.md index 3353dacc..260818c8 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,7 @@ information on what to include when reporting a bug. - [Cocoa] Bugfix: Value range was ignored for joystick hats and buttons (#888) - [Cocoa] Bugfix: Full screen framebuffer was incorrectly sized for some video modes (#682) +- [Cocoa] Bugfix: A string object for IME was updated non-idiomatically (#1050) - [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts - [WGL] Added support for `WGL_ARB_create_context_no_error` - [GLX] Added support for `GLX_ARB_create_context_no_error` diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 2acfa98b..4c27c517 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -698,10 +698,11 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange { + [markedText release]; if ([string isKindOfClass:[NSAttributedString class]]) - [markedText initWithAttributedString:string]; + markedText = [[NSMutableAttributedString alloc] initWithAttributedString:string]; else - [markedText initWithString:string]; + markedText = [[NSMutableAttributedString alloc] initWithString:string]; } - (void)unmarkText