Simplify preedit overlay creation
This commit is contained in:
parent
f625297475
commit
88ffba4a3a
1 changed files with 3 additions and 8 deletions
|
|
@ -221,15 +221,10 @@ where
|
|||
if let Some(preedit) = preedit {
|
||||
if preedit.content.is_empty() {
|
||||
self.preedit = None;
|
||||
} else if let Some(overlay) = &mut self.preedit {
|
||||
overlay.update(
|
||||
position,
|
||||
&preedit,
|
||||
self.state.background_color(),
|
||||
&self.renderer,
|
||||
);
|
||||
} else {
|
||||
let mut overlay = Preedit::new();
|
||||
let mut overlay =
|
||||
self.preedit.take().unwrap_or_else(Preedit::new);
|
||||
|
||||
overlay.update(
|
||||
position,
|
||||
&preedit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue