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 {
7171 scopeType as SimpleScopeType ,
7272 ) ;
7373
74- if ( scopeType . type === "comment" ) {
74+ if ( useContiguousScopeHandler ( scopeType ) ) {
7575 return new ContiguousScopeHandler ( scopeHandler ) ;
7676 }
7777
@@ -151,3 +151,15 @@ function readQueryFileAndImports(languageQueryPath: string) {
151151
152152 return Object . values ( rawQueryStrings ) . join ( "\n" ) ;
153153}
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