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(
4747 "sas/getFoldingBlock" ,
4848 {
4949 textDocument : { uri : window . activeTextEditor . document . uri . toString ( ) } ,
50- position : { line, col } ,
50+ line,
51+ col,
5152 } ,
5253 ) ;
5354 if ( block ) {
Original file line number Diff line number Diff line change @@ -280,22 +280,19 @@ export const runServer = (
280280 } ) ;
281281
282282 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+ }
299296 } ) ;
300297
301298 connection . onDocumentOnTypeFormatting ( async ( params ) => {
You can’t perform that action at this time.
0 commit comments