fix: whitespace in new line completions

This commit is contained in:
tomasz-io 2024-11-28 12:07:41 -08:00
parent 403eb38b9e
commit 4db2637d5b

View file

@ -121,11 +121,8 @@ export function postprocessCompletion({
// }
// If prefix ends with space and so does completion, then remove the space from completion
if (
prefix.split("\n").pop()?.trim() !== "" &&
prefix.endsWith(" ") &&
completion.startsWith(" ")
) {
if (prefix.endsWith(" ") && completion.startsWith(" ")) {
completion = completion.slice(1);
}