File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ class OpenController implements vscode.Disposable {
19
19
constructor ( ) {
20
20
21
21
const subscriptions : vscode . Disposable [ ] = [ ] ;
22
- const disposable = vscode . commands . registerCommand ( 'workbench.action.files.openFileWithDefaultApplication' , ( uri : vscode . Uri | undefined ) => {
23
- this . open ( uri ) ;
22
+ const disposable = vscode . commands . registerCommand ( 'workbench.action.files.openFileWithDefaultApplication' , ( uri : vscode . Uri | undefined , uris : vscode . Uri [ ] | undefined ) => {
23
+ this . open ( uri , uris ) ;
24
24
} ) ;
25
25
subscriptions . push ( disposable ) ;
26
26
@@ -48,7 +48,16 @@ class OpenController implements vscode.Disposable {
48
48
this . _disposable . dispose ( ) ;
49
49
}
50
50
51
- private open ( uri : vscode . Uri | undefined ) : void {
51
+ private open ( uri : vscode . Uri | undefined , uris : vscode . Uri [ ] | undefined ) : void {
52
+ if ( uris && uris . some ( ( uri ) => uri ?. scheme ) ) {
53
+ uris
54
+ . filter ( ( uri ) => uri ?. scheme )
55
+ . forEach ( ( uri ) => {
56
+ console . log ( "Opening from uris" , uri . toString ( ) ) ;
57
+ this . openFile ( uri . toString ( ) ) ;
58
+ } ) ;
59
+ return ;
60
+ }
52
61
53
62
if ( uri ?. scheme ) {
54
63
console . log ( "Opening from uri" , uri . toString ( ) ) ;
You can’t perform that action at this time.
0 commit comments