linux: Fix IME panel position while enumerating input methods (#12495)
Release Notes: - N/A This updates the IME position every time the selection changes, this is probably only useful when you enumerate languages with your IME. TODO: - ~There is a rare chance that the ime panel is not updated because the window input handler is None.~ - ~Update IME panel in vim mode.~ - ~Update IME panel when leaving Buffer search input.~ --------- Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
e6d5f4406f
commit
8e8927db4b
21 changed files with 244 additions and 55 deletions
|
@ -225,8 +225,15 @@ impl ViewInputHandler for TextInput {
|
|||
Some(self.content[range].to_string())
|
||||
}
|
||||
|
||||
fn selected_text_range(&mut self, _cx: &mut ViewContext<Self>) -> Option<Range<usize>> {
|
||||
Some(self.range_to_utf16(&self.selected_range))
|
||||
fn selected_text_range(
|
||||
&mut self,
|
||||
_ignore_disabled_input: bool,
|
||||
_cx: &mut ViewContext<Self>,
|
||||
) -> Option<UTF16Selection> {
|
||||
Some(UTF16Selection {
|
||||
range: self.range_to_utf16(&self.selected_range),
|
||||
reversed: self.selection_reversed,
|
||||
})
|
||||
}
|
||||
|
||||
fn marked_text_range(&self, _cx: &mut ViewContext<Self>) -> Option<Range<usize>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue