Skip to content

Commit

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

// candidates to completions
Expand Down

0 comments on commit 9ba73ff

Please sign in to comment.