File tree Expand file tree Collapse file tree 5 files changed +5
-36
lines changed
processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler Expand file tree Collapse file tree 5 files changed +5
-36
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ export interface SpokenFormMapKeyTypes {
1616 pairedDelimiter : SpeakableSurroundingPairName ;
1717 simpleScopeTypeType : SimpleScopeTypeType ;
1818 complexScopeTypeType : "glyph" ;
19- surroundingPairForceDirection : "left" | "right" ;
2019
2120 /**
2221 * These modifier types are spoken by directly saying the spoken form for the
Original file line number Diff line number Diff line change @@ -232,12 +232,6 @@ export interface SurroundingPairScopeType {
232232 type : "surroundingPair" ;
233233 delimiter : SurroundingPairName ;
234234
235- /**
236- * @deprecated Not supported by next-gen surrounding pairs; we don't believe
237- * anyone uses this
238- */
239- forceDirection ?: SurroundingPairDirection ;
240-
241235 /**
242236 * If `true`, then only accept pairs where the pair completely contains the
243237 * selection, ie without the edges touching.
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ export class PrimitiveTargetSpokenFormGenerator {
232232 case "oneOf" :
233233 case "surroundingPairInterior" :
234234 throw new NoSpokenFormError ( `Scope type '${ scopeType . type } '` ) ;
235+
235236 case "glyph" :
236237 return [
237238 this . spokenFormMap . complexScopeTypeType . glyph ,
@@ -241,18 +242,9 @@ export class PrimitiveTargetSpokenFormGenerator {
241242 scopeType . character ,
242243 ) ,
243244 ] ;
244- case "surroundingPair" : {
245- const pair = this . spokenFormMap . pairedDelimiter [ scopeType . delimiter ] ;
246- if ( scopeType . forceDirection != null ) {
247- return [
248- this . spokenFormMap . surroundingPairForceDirection [
249- scopeType . forceDirection
250- ] ,
251- pair ,
252- ] ;
253- }
254- return pair ;
255- }
245+
246+ case "surroundingPair" :
247+ return this . spokenFormMap . pairedDelimiter [ scopeType . delimiter ] ;
256248
257249 case "customRegex" :
258250 return (
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ import type {
44 SurroundingPairScopeType ,
55 TextEditor ,
66} from "@cursorless/common" ;
7- import { showError , type ScopeType } from "@cursorless/common" ;
7+ import { type ScopeType } from "@cursorless/common" ;
88import type { LanguageDefinitions } from "../../../../languages/LanguageDefinitions" ;
9- import { ide } from "../../../../singletons/ide.singleton" ;
109import { BaseScopeHandler } from "../BaseScopeHandler" ;
1110import { compareTargetScopes } from "../compareTargetScopes" ;
1211import type { TargetScope } from "../scope.types" ;
@@ -35,16 +34,6 @@ export class SurroundingPairScopeHandler extends BaseScopeHandler {
3534 direction : Direction ,
3635 hints : ScopeIteratorRequirements ,
3736 ) : Iterable < TargetScope > {
38- if ( this . scopeType . forceDirection != null ) {
39- // DEPRECATED @ 2024-07-01
40- void showError (
41- ide ( ) . messages ,
42- "deprecatedForceDirection" ,
43- "forceDirection is deprecated. If this is important to you please file an issue on the cursorless repo." ,
44- ) ;
45- return ;
46- }
47-
4837 const delimiterOccurrences = getDelimiterOccurrences (
4938 this . languageDefinitions . get ( this . languageId ) ,
5039 editor . document ,
Original file line number Diff line number Diff line change @@ -111,11 +111,6 @@ export const defaultSpokenFormMapCore: DefaultSpokenFormMapDefinition = {
111111 glyph : "glyph" ,
112112 } ,
113113
114- surroundingPairForceDirection : {
115- left : "left" ,
116- right : "right" ,
117- } ,
118-
119114 simpleModifier : {
120115 excludeInterior : "bounds" ,
121116 toRawSelection : "just" ,
You can’t perform that action at this time.
0 commit comments