From 42d05480fc7486129891639ab7ea21c4cfd132c0 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 3 Aug 2024 08:57:22 +0200 Subject: [PATCH 1/2] Update packages/cursorless-engine/src/processTargets/targets/DestinationImpl.ts Co-authored-by: Phil Cohen --- .../src/processTargets/targets/DestinationImpl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cursorless-engine/src/processTargets/targets/DestinationImpl.ts b/packages/cursorless-engine/src/processTargets/targets/DestinationImpl.ts index 46e271ed2d..793aa9433e 100644 --- a/packages/cursorless-engine/src/processTargets/targets/DestinationImpl.ts +++ b/packages/cursorless-engine/src/processTargets/targets/DestinationImpl.ts @@ -126,7 +126,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; } From 0caf11410e828dc9dbe6a8563d4a7c908ec054e5 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 3 Aug 2024 08:57:52 +0200 Subject: [PATCH 2/2] Update packages/common/src/types/TextLine.ts Co-authored-by: Phil Cohen --- packages/common/src/types/TextLine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/src/types/TextLine.ts b/packages/common/src/types/TextLine.ts index 056c2f1286..949b871914 100644 --- a/packages/common/src/types/TextLine.ts +++ b/packages/common/src/types/TextLine.ts @@ -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;