Skip to content

Commit

Permalink
Merge branch 'rangeTrimmed' of github.com:cursorless-dev/cursorless i…
Browse files Browse the repository at this point in the history
…nto rangeTrimmed
  • Loading branch information
AndreasArvidsson committed Aug 3, 2024
2 parents ca1d95f + 0caf114 commit 1751559
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/types/TextLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface TextLine {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class DestinationImpl implements Destination {
? line.rangeTrimmed?.start ?? line.range.start
: line.rangeTrimmed?.end ?? line.range.end;

// Use the full line with including indentation and trailing whitespaces
// Use the full line, including indentation and trailing whitespaces
if (insertionPosition.isEqual(trimmedPosition)) {
return this.isBefore ? line.range.start : line.range.end;
}
Expand Down

0 comments on commit 1751559

Please sign in to comment.