File tree Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ async function getSelectedRegions(
47
47
"sas/getFoldingBlock" ,
48
48
{
49
49
textDocument : { uri : window . activeTextEditor . document . uri . toString ( ) } ,
50
- position : { line, col } ,
50
+ line,
51
+ col,
51
52
} ,
52
53
) ;
53
54
if ( block ) {
Original file line number Diff line number Diff line change @@ -280,22 +280,19 @@ export const runServer = (
280
280
} ) ;
281
281
282
282
connection . onRequest ( "sas/getFoldingBlock" , async ( params ) => {
283
- return await dispatch ( params , {
284
- async default ( languageServices ) {
285
- const block = languageServices . sasLanguageService . getFoldingBlock (
286
- params . position . line ,
287
- params . position . col ,
288
- params . strict ?? true ,
289
- params . ignoreCustomBlock ,
290
- params . ignoreGlobalBlock ,
291
- ) ;
292
- if ( ! block ) {
293
- return undefined ;
294
- } else {
295
- return { ...block , outerBlock : undefined , innerBlocks : undefined } ;
296
- }
297
- } ,
298
- } ) ;
283
+ const languageService = getLanguageService ( params . textDocument . uri ) ;
284
+ const block = languageService . getFoldingBlock (
285
+ params . line ,
286
+ params . col ,
287
+ params . strict ?? true ,
288
+ params . ignoreCustomBlock ,
289
+ params . ignoreGlobalBlock ,
290
+ ) ;
291
+ if ( ! block ) {
292
+ return undefined ;
293
+ } else {
294
+ return { ...block , outerBlock : undefined , innerBlocks : undefined } ;
295
+ }
299
296
} ) ;
300
297
301
298
connection . onDocumentOnTypeFormatting ( async ( params ) => {
You can’t perform that action at this time.
0 commit comments