mirror of
https://github.com/glfw/glfw.git
synced 2025-06-14 19:52:14 +00:00
macOS: Enable to clear preedit after commit input.
This commit is contained in:
parent
c2923ac577
commit
86b2c3b579
@ -751,6 +751,9 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
- (void)unmarkText
|
||||
{
|
||||
[[markedText mutableString] setString:@""];
|
||||
window->nblocks = 0;
|
||||
window->ntext = 0;
|
||||
_glfwInputPreedit(window, 0);
|
||||
}
|
||||
|
||||
- (NSArray*)validAttributesForMarkedText
|
||||
@ -816,6 +819,8 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
_glfwInputChar(window, codepoint, mods, plain);
|
||||
}
|
||||
}
|
||||
|
||||
[self unmarkText];
|
||||
}
|
||||
|
||||
- (void)doCommandBySelector:(SEL)selector
|
||||
|
Loading…
Reference in New Issue
Block a user