Skip to content

Commit d212a20

Browse files
Doc string
1 parent f7b6f8c commit d212a20

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/util/getCollectionItemRemovalRange.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ import type { Range, TextEditor } from "@cursorless/common";
22

33
import { getRangeLength } from "../../../../util/rangeUtils";
44

5+
/**
6+
* We have both leading and trailing delimiter ranges
7+
* If the leading one is longer/more specific, prefer to use that for removal;
8+
* otherwise use undefined to fallback to the default behavior (often trailing)
9+
*/
510
export function getCollectionItemRemovalRange(
611
isEveryScope: boolean,
712
editor: TextEditor,
813
contentRange: Range,
914
leadingDelimiterRange: Range | undefined,
1015
trailingDelimiterRange: Range | undefined,
1116
): Range | undefined {
12-
// We have both leading and trailing delimiter ranges
13-
// If the leading one is longer/more specific, prefer to use that for removal;
14-
// otherwise use undefined to fallback to the default behavior (often trailing)
1517
return !isEveryScope &&
1618
leadingDelimiterRange != null &&
1719
trailingDelimiterRange != null &&

0 commit comments

Comments
 (0)