@@ -10,21 +10,24 @@ import type { Command } from "@cursorless/common";
10
10
import type { DecorationItem } from "shiki" ;
11
11
import { createDecorations } from "../index" ;
12
12
13
- export async function getDecorations (
14
- testCaseState : ExtendedTestCaseSnapshot ,
15
- command : Command
16
- ) : Promise < DecorationItem [ ] [ ] > {
17
- const { messages, flashes, highlights, finalStateMarkHelpers } = testCaseState ;
18
- const potentialMarks = testCaseState . marks || { } ;
19
- const lines = testCaseState . documentContents . split ( "\n" ) ;
13
+ export async function getDecorations ( {
14
+ snapshot,
15
+ command
16
+ } : {
17
+ snapshot : ExtendedTestCaseSnapshot ;
18
+ command : Command ;
19
+ } ) : Promise < DecorationItem [ ] [ ] > {
20
+ const { messages, flashes, highlights, finalStateMarkHelpers } = snapshot ;
21
+ const potentialMarks = snapshot . marks || { } ;
22
+ const lines = snapshot . documentContents . split ( "\n" ) ;
20
23
const obj = {
21
24
marks : potentialMarks ,
22
25
ide : { messages, flashes, highlights } ,
23
26
command,
24
27
lines,
25
- selections : testCaseState . selections ,
26
- thatMark : testCaseState . thatMark ,
27
- sourceMark : testCaseState . sourceMark ,
28
+ selections : snapshot . selections ,
29
+ thatMark : snapshot . thatMark ,
30
+ sourceMark : snapshot . sourceMark ,
28
31
finalStateMarkHelpers
29
32
} ;
30
33
const decorations = createDecorations ( obj ) ;
0 commit comments