1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Cocoa: Fix string object being updated incorrectly

Fixes #1050.
This commit is contained in:
Camilla Löwy 2017-08-06 23:04:19 +02:00
parent 5b7281bd41
commit ab2247f8f3
2 changed files with 4 additions and 2 deletions

View File

@ -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`

View File

@ -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