mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 02:37:21 +00:00
Prevent IME window from appearing while editor's input is disabled (vim)
This commit is contained in:
parent
7c575990be
commit
beeaec8647
1 changed files with 6 additions and 0 deletions
|
@ -5888,6 +5888,12 @@ impl View for Editor {
|
|||
}
|
||||
|
||||
fn selected_text_range(&self, cx: &AppContext) -> Option<Range<usize>> {
|
||||
// Prevent the IME menu from appearing when holding down an alphabetic key
|
||||
// while input is disabled.
|
||||
if !self.input_enabled {
|
||||
return None;
|
||||
}
|
||||
|
||||
let range = self.selections.newest::<OffsetUtf16>(cx).range();
|
||||
Some(range.start.0..range.end.0)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue