diff --git a/packages/common/src/ide/types/Configuration.ts b/packages/common/src/ide/types/Configuration.ts index 6becf59b46..6ee3a7bc87 100644 --- a/packages/common/src/ide/types/Configuration.ts +++ b/packages/common/src/ide/types/Configuration.ts @@ -9,9 +9,6 @@ export type CursorlessConfiguration = { experimental: { snippetsDir: string | undefined; hatStability: HatStability }; decorationDebounceDelayMs: number; debug: boolean; - private: { - lineParagraphIterationScope: boolean; - }; }; export type CursorlessConfigKey = keyof CursorlessConfiguration; @@ -30,9 +27,6 @@ export const CONFIGURATION_DEFAULTS: CursorlessConfiguration = { hatStability: HatStability.balanced, }, debug: false, - private: { - lineParagraphIterationScope: false, - }, }; export interface Configuration { diff --git a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/LineScopeHandler.ts b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/LineScopeHandler.ts index ac9b8bce0a..e57b1094c5 100644 --- a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/LineScopeHandler.ts +++ b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/LineScopeHandler.ts @@ -3,23 +3,22 @@ import { Position, Range, ScopeType, - SimpleScopeTypeType, TextEditor, } from "@cursorless/common"; -import { ide } from "../../../singletons/ide.singleton"; import { LineTarget } from "../../targets"; import { BaseScopeHandler } from "./BaseScopeHandler"; import type { TargetScope } from "./scope.types"; export class LineScopeHandler extends BaseScopeHandler { public readonly scopeType = { type: "line" } as const; - public readonly iterationScopeType: ScopeType; + public readonly iterationScopeType: ScopeType = { + type: "paragraph", + } as const; protected readonly isHierarchical = false; public readonly includeAdjacentInEvery: boolean = true; constructor(_scopeType: ScopeType, _languageId: string) { super(); - this.iterationScopeType = { type: getIterationScopeTypeType() }; } *generateScopeCandidates( @@ -75,10 +74,3 @@ export function fitRangeToLineContent(editor: TextEditor, range: Range) { endLine.lastNonWhitespaceCharacterIndex, ); } - -function getIterationScopeTypeType(): SimpleScopeTypeType { - const useParagraph = ide().configuration.getOwnConfiguration( - "private.lineParagraphIterationScope", - ); - return useParagraph ? "paragraph" : "document"; -} diff --git a/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/modifiers/everyScope/clearEveryLine.yml b/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/modifiers/everyScope/clearEveryLine.yml index c19c71f88b..68b13cd3cd 100644 --- a/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/modifiers/everyScope/clearEveryLine.yml +++ b/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/modifiers/everyScope/clearEveryLine.yml @@ -26,5 +26,3 @@ finalState: active: {line: 0, character: 0} - anchor: {line: 1, character: 0} active: {line: 1, character: 0} - - anchor: {line: 2, character: 0} - active: {line: 2, character: 0} diff --git a/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/selectionTypes/takeEveryLine.yml b/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/selectionTypes/takeEveryLine.yml index 21870b59c2..8746b754e8 100644 --- a/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/selectionTypes/takeEveryLine.yml +++ b/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/selectionTypes/takeEveryLine.yml @@ -18,8 +18,8 @@ initialState: d e f g selections: - - anchor: {line: 6, character: 0} - active: {line: 6, character: 0} + - anchor: {line: 5, character: 0} + active: {line: 5, character: 0} marks: {} finalState: documentContents: | @@ -30,17 +30,9 @@ finalState: d e f g selections: - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} - - anchor: {line: 1, character: 0} - active: {line: 1, character: 1} - - anchor: {line: 2, character: 0} - active: {line: 2, character: 0} - anchor: {line: 3, character: 0} active: {line: 3, character: 5} - anchor: {line: 4, character: 0} active: {line: 4, character: 5} - anchor: {line: 5, character: 0} active: {line: 5, character: 5} - - anchor: {line: 6, character: 0} - active: {line: 6, character: 0}