summaryrefslogtreecommitdiffstats
path: root/widget/src/text_editor.rs
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-02-13 05:19:32 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-13 05:19:32 +0100
commitf889008e21971b461ec7c54d9a7667a23f6ab35b (patch)
tree91d9d34c87796da424104c46705e9f1aceb69f92 /widget/src/text_editor.rs
parent97f1db3783dca5a4f60a9f89668613de4dfe9edd (diff)
parent89a4dc2ac2a751fdcae921997bb93a76f9b667f9 (diff)
downloadiced-f889008e21971b461ec7c54d9a7667a23f6ab35b.tar.gz
iced-f889008e21971b461ec7c54d9a7667a23f6ab35b.tar.bz2
iced-f889008e21971b461ec7c54d9a7667a23f6ab35b.zip
Merge pull request #2793 from rhysd/issue-2792
Fix the initial candidate window position
Diffstat (limited to 'widget/src/text_editor.rs')
-rw-r--r--widget/src/text_editor.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs
index ce5da9ef..7e40a56a 100644
--- a/widget/src/text_editor.rs
+++ b/widget/src/text_editor.rs
@@ -339,10 +339,6 @@ where
return InputMethod::Disabled;
};
- let Some(preedit) = &state.preedit else {
- return InputMethod::Allowed;
- };
-
let bounds = layout.bounds();
let internal = self.content.0.borrow_mut();
@@ -363,10 +359,10 @@ where
let position =
cursor + translation + Vector::new(0.0, f32::from(line_height));
- InputMethod::Open {
+ InputMethod::Enabled {
position,
purpose: input_method::Purpose::Normal,
- preedit: Some(preedit.as_ref()),
+ preedit: state.preedit.as_ref().map(input_method::Preedit::as_ref),
}
}
}