Skip to content

Commit

Permalink
fix: check if raw_input is empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Feb 22, 2024
1 parent 9ba73ff commit a8b19cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ impl Backend {
// prevent deleting puncts before real pinyin input
let real_offset = new_offset
+ raw_input
.and_then(utils::option_string)
.and_then(|rime_raw_input| new_input.borrow_pinyin().rfind(&rime_raw_input))
.unwrap_or(0);

Expand Down

0 comments on commit a8b19cd

Please sign in to comment.