File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
packages/cursorless-engine/src/languages Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class LanguageDefinition {
71
71
scopeType as SimpleScopeType ,
72
72
) ;
73
73
74
- if ( scopeType . type === "comment" ) {
74
+ if ( useContiguousScopeHandler ( scopeType ) ) {
75
75
return new ContiguousScopeHandler ( scopeHandler ) ;
76
76
}
77
77
@@ -151,3 +151,15 @@ function readQueryFileAndImports(languageQueryPath: string) {
151
151
152
152
return Object . values ( rawQueryStrings ) . join ( "\n" ) ;
153
153
}
154
+
155
+ /**
156
+ * Returns true if the given scope type should use a contiguous scope handler.
157
+ */
158
+ function useContiguousScopeHandler ( scopeType : ScopeType ) : boolean {
159
+ switch ( scopeType . type ) {
160
+ case "comment" :
161
+ return true ;
162
+ default :
163
+ return false ;
164
+ }
165
+ }
You can’t perform that action at this time.
0 commit comments