Simplify IME support
This commit is contained in:
parent
97ce9e9586
commit
9a022671a2
8 changed files with 148 additions and 218 deletions
|
@ -9565,7 +9565,7 @@ impl Render for Editor {
|
|||
|
||||
impl InputHandler for Editor {
|
||||
fn text_for_range(
|
||||
&self,
|
||||
&mut self,
|
||||
range_utf16: Range<usize>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> Option<String> {
|
||||
|
@ -9578,7 +9578,7 @@ impl InputHandler for Editor {
|
|||
)
|
||||
}
|
||||
|
||||
fn selected_text_range(&self, cx: &mut ViewContext<Self>) -> Option<Range<usize>> {
|
||||
fn selected_text_range(&mut self, cx: &mut ViewContext<Self>) -> Option<Range<usize>> {
|
||||
// Prevent the IME menu from appearing when holding down an alphabetic key
|
||||
// while input is disabled.
|
||||
if !self.input_enabled {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue