mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 00:39:51 +00:00
commit
c612dc8a31
2 changed files with 11 additions and 17 deletions
|
@ -1169,22 +1169,17 @@ extern "C" fn insert_text(this: &Object, _: Sel, text: id, replacement_range: NS
|
||||||
.flatten()
|
.flatten()
|
||||||
.is_some();
|
.is_some();
|
||||||
|
|
||||||
match pending_key_down {
|
if is_composing || text.chars().count() > 1 || pending_key_down.is_none() {
|
||||||
None | Some(_) if is_composing || text.chars().count() > 1 => {
|
with_input_handler(this, |input_handler| {
|
||||||
with_input_handler(this, |input_handler| {
|
input_handler.replace_text_in_range(replacement_range, text)
|
||||||
input_handler.replace_text_in_range(replacement_range, text)
|
});
|
||||||
});
|
} else {
|
||||||
}
|
let mut pending_key_down = pending_key_down.unwrap();
|
||||||
|
pending_key_down.1 = Some(InsertText {
|
||||||
Some(mut pending_key_down) => {
|
replacement_range,
|
||||||
pending_key_down.1 = Some(InsertText {
|
text: text.to_string(),
|
||||||
replacement_range,
|
});
|
||||||
text: text.to_string(),
|
window_state.borrow_mut().pending_key_down = Some(pending_key_down);
|
||||||
});
|
|
||||||
window_state.borrow_mut().pending_key_down = Some(pending_key_down);
|
|
||||||
}
|
|
||||||
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
styles/package-lock.json
generated
1
styles/package-lock.json
generated
|
@ -5,7 +5,6 @@
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "styles",
|
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in a new issue