Skip to content

Commit 03ea9e4

Browse files
Use the change when calculating the range after extending a completion
1 parent 42d38a4 commit 03ea9e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/completion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export function insertCompletionText(state: EditorState, text: string | Text, fr
274274
}
275275
return {
276276
changes: change,
277-
range: EditorSelection.cursor(range.from + fromOff + text.length)
277+
range: EditorSelection.cursor(change.from + change.insert.length)
278278
}
279279
}),
280280
userEvent: "input.complete"

0 commit comments

Comments
 (0)