windows: Fix panic when deleting the last pre-edit char using Pinyin IME (#32442)
Release Notes: - N/A
This commit is contained in:
parent
16853acbb1
commit
2dad48d8d9
1 changed files with 1 additions and 1 deletions
|
@ -702,7 +702,7 @@ fn handle_ime_composition_inner(
|
|||
} else {
|
||||
if lparam & GCS_COMPSTR.0 > 0 {
|
||||
let comp_string = parse_ime_composition_string(ctx, GCS_COMPSTR)?;
|
||||
let caret_pos = (lparam & GCS_CURSORPOS.0 > 0).then(|| {
|
||||
let caret_pos = (!comp_string.is_empty() && lparam & GCS_CURSORPOS.0 > 0).then(|| {
|
||||
let pos = retrieve_composition_cursor_position(ctx);
|
||||
pos..pos
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue