Skip to content

Commit

Permalink
Add userEvent annotation to snippet completions
Browse files Browse the repository at this point in the history
FIX: Make sure snippet completions also set `userEvent` to `input.complete`.

Closes #19
  • Loading branch information
marijnh committed Jan 1, 2024
1 parent ffaa367 commit 36067ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snippet.ts
Expand Up @@ -171,7 +171,7 @@ export function snippet(template: string) {
let spec: TransactionSpec = {
changes: {from, to, insert: Text.of(text)},
scrollIntoView: true,
annotations: completion ? pickedCompletion.of(completion) : undefined
annotations: completion ? [pickedCompletion.of(completion), Transaction.userEvent.of("input.complete")] : undefined
}
if (ranges.length) spec.selection = fieldSelection(ranges, 0)
if (ranges.length > 1) {
Expand Down

0 comments on commit 36067ab

Please sign in to comment.