diff --git a/src/lsp.rs b/src/lsp.rs index 486b4af..d45a2c2 100644 --- a/src/lsp.rs +++ b/src/lsp.rs @@ -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);