(
[targets]: [TypedSelection[]],
{ showDecorations = true } = {}
)
| 20 | } |
| 21 | |
| 22 | async run( |
| 23 | [targets]: [TypedSelection[]], |
| 24 | { showDecorations = true } = {} |
| 25 | ): Promise<ActionReturnValue> { |
| 26 | if (showDecorations) { |
| 27 | await displayPendingEditDecorations( |
| 28 | targets, |
| 29 | this.graph.editStyles.pendingDelete |
| 30 | ); |
| 31 | } |
| 32 | |
| 33 | const thatMark = flatten( |
| 34 | await runOnTargetsForEachEditor(targets, async (editor, targets) => { |
| 35 | const edits = targets.map((target) => ({ |
| 36 | range: target.selection.selection, |
| 37 | text: "", |
| 38 | })); |
| 39 | |
| 40 | const [updatedSelections] = await performEditsAndUpdateSelections( |
| 41 | this.graph.rangeUpdater, |
| 42 | editor, |
| 43 | edits, |
| 44 | [targets.map((target) => target.selection.selection)] |
| 45 | ); |
| 46 | |
| 47 | return updatedSelections.map((selection) => ({ |
| 48 | editor, |
| 49 | selection, |
| 50 | })); |
| 51 | }) |
| 52 | ); |
| 53 | |
| 54 | return { thatMark }; |
| 55 | } |
| 56 | } |
nothing calls this directly
no test coverage detected