fix: wrong checked prefix on completing strings (#422)

This commit is contained in:
Myriad-Dreamin 2024-07-17 15:34:33 +08:00 committed by GitHub
parent 134bd063be
commit 8413c66c51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -199,8 +199,7 @@ impl StatefulRequest for CompletionRequest {
replace_range = ctx.to_lsp_range(rng, &source);
} else {
let lsp_start_position = ctx.to_lsp_pos(offset, &source);
replace_range = LspRange::new(lsp_start_position, self.position);
replace_range = ctx.to_lsp_range(offset..cursor, &source);
}
let completions = completions.iter().map(|typst_completion| {