mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-20 19:19:41 +03:00
Clear the pre-edit text only when inserting non-control characters
Maintains the pre-edit input state after pressing the modifier key combination or function key while using the IME.
This commit is contained in:
parent
3ee12082f2
commit
b2d0c35fc2
@ -1461,7 +1461,7 @@ - (void)insertText:(id)string replacementRange:(NSRange)replacementRange
|
||||
{
|
||||
const char *utf8 = polymorphic_string_as_utf8(string);
|
||||
debug_key("\n\tinsertText: %s replacementRange: (%lu, %lu)\n", utf8, replacementRange.location, replacementRange.length);
|
||||
if ([self hasMarkedText]) {
|
||||
if ([self hasMarkedText] && !is_ascii_control_char(utf8[0])) {
|
||||
[self unmarkText];
|
||||
marked_text_cleared_by_insert = true;
|
||||
if (!in_key_handler) {
|
||||
|
Loading…
Reference in New Issue
Block a user