MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / calculateMarks

Method calculateMarks

src/actions/BringMoveSwap.ts:255–269  ·  view source on GitHub ↗
(markEntries: MarkEntry[])

Source from the content-addressed store, hash-verified

253 }
254
255 private calculateMarks(markEntries: MarkEntry[]) {
256 // Only swap has sources as a "that" mark
257 const thatMark =
258 this.type === "swap"
259 ? markEntries
260 : markEntries.filter(({ isSource }) => !isSource);
261
262 // Only swap doesn't have a source mark
263 const sourceMark =
264 this.type === "swap"
265 ? []
266 : markEntries.filter(({ isSource }) => isSource);
267
268 return { thatMark, sourceMark };
269 }
270
271 async run([sources, destinations]: [
272 TypedSelection[],

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected