mirror of
https://github.com/glfw/glfw.git
synced 2025-06-15 12:12:16 +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
|
- (void)unmarkText
|
||||||
{
|
{
|
||||||
[[markedText mutableString] setString:@""];
|
[[markedText mutableString] setString:@""];
|
||||||
|
window->nblocks = 0;
|
||||||
|
window->ntext = 0;
|
||||||
|
_glfwInputPreedit(window, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray*)validAttributesForMarkedText
|
- (NSArray*)validAttributesForMarkedText
|
||||||
@ -816,6 +819,8 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||||||
_glfwInputChar(window, codepoint, mods, plain);
|
_glfwInputChar(window, codepoint, mods, plain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[self unmarkText];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)doCommandBySelector:(SEL)selector
|
- (void)doCommandBySelector:(SEL)selector
|
||||||
|
Loading…
Reference in New Issue
Block a user