Skip to content

Commit 1751559

Browse files
Merge branch 'rangeTrimmed' of github.com:cursorless-dev/cursorless into rangeTrimmed
2 parents ca1d95f + 0caf114 commit 1751559

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/common/src/types/TextLine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface TextLine {
2929

3030
/**
3131
* The trimmed range, which excludes leading and trailing whitespace (`/\s/`).
32-
* **Note** that if a line is all whitespace this is undefined so the trimmed range can never be empty.
32+
* **Note:** if a line is all whitespace, the `rangeTrimmed` is undefined. Thus, a trimmed range can never be empty.
3333
*/
3434
readonly rangeTrimmed: Range | undefined;
3535

packages/cursorless-engine/src/processTargets/targets/DestinationImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class DestinationImpl implements Destination {
122122
? line.rangeTrimmed?.start ?? line.range.start
123123
: line.rangeTrimmed?.end ?? line.range.end;
124124

125-
// Use the full line with including indentation and trailing whitespaces
125+
// Use the full line, including indentation and trailing whitespaces
126126
if (insertionPosition.isEqual(trimmedPosition)) {
127127
return this.isBefore ? line.range.start : line.range.end;
128128
}

0 commit comments

Comments
 (0)