File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -442,13 +442,21 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
442
442
} ) ;
443
443
vscode . window . onDidChangeTextEditorSelection ( ( event : vscode . TextEditorSelectionChangeEvent ) => {
444
444
posPanel . text = "" ;
445
- const intMatch = event . textEditor . document . fileName . match ( / \/ ? ( . * ) \. i n t $ / i ) ;
446
- if ( ! intMatch || event . selections . length > 1 || ! event . selections [ 0 ] . isEmpty ) {
445
+ const document = event . textEditor . document ;
446
+ if ( document . languageId !== "objectscript" ) {
447
447
return ;
448
448
}
449
+ if ( event . selections . length > 1 || ! event . selections [ 0 ] . isEmpty ) {
450
+ return ;
451
+ }
452
+
453
+ const file = currentFile ( document ) ;
454
+ const nameMatch = file . name . match ( / ( .* ) \. ( i n t | m a c ) $ / i) ;
455
+ if ( ! nameMatch ) {
456
+ return ;
457
+ }
458
+ const [ , routine ] = nameMatch ;
449
459
const line = event . selections [ 0 ] . start . line ;
450
- const [ , routine ] = intMatch ;
451
- const { document } = event . textEditor ;
452
460
let label = "" ;
453
461
let pos = 0 ;
454
462
for ( let i = line ; i > 0 ; i -- ) {
You can’t perform that action at this time.
0 commit comments