File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ class StudioActions {
176
176
}
177
177
case 5 : // Studio will open the documents listed in Target
178
178
target . split ( "," ) . forEach ( ( element ) => {
179
- let classname = element ;
179
+ let classname : string = element ;
180
180
let method : string ;
181
181
let offset = 0 ;
182
182
if ( element . includes ( ":" ) ) {
@@ -200,9 +200,10 @@ class StudioActions {
200
200
const line = document . lineAt ( i ) ;
201
201
if ( isCorrectMethod ( line . text ) ) {
202
202
if ( ! line . text . endsWith ( "{" ) ) offset ++ ;
203
- const cursor = newEditor . selection . active ;
204
- const newPosition = cursor . with ( i + offset , 0 ) ;
205
- newEditor . selection = new vscode . Selection ( newPosition , newPosition ) ;
203
+ const targetLine = document . lineAt ( i + offset ) ;
204
+ const range = new vscode . Range ( targetLine . range . start , targetLine . range . start ) ;
205
+ newEditor . selection = new vscode . Selection ( range . start , range . start ) ;
206
+ newEditor . revealRange ( range , vscode . TextEditorRevealType . InCenter ) ;
206
207
break ;
207
208
}
208
209
}
Original file line number Diff line number Diff line change @@ -107,6 +107,10 @@ export class DocumentContentProvider implements vscode.TextDocumentContentProvid
107
107
query : `ns=${ namespace } ` ,
108
108
} ) ;
109
109
}
110
+ } else if ( isCsp ) {
111
+ uri = uri . with ( {
112
+ query : "csp=1" ,
113
+ } ) ;
110
114
}
111
115
return uri ;
112
116
}
You can’t perform that action at this time.
0 commit comments