File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -42,19 +42,21 @@ export async function deleteExplorerItems(nodes: NodeBase[]): Promise<any> {
42
42
)
43
43
)
44
44
. then ( async ( items ) => {
45
- if ( nodes . length > 1 ) {
46
- // Ask the user to confirm if they're deleting more than one explorer node
45
+ if ( items . length ) {
46
+ // Ask the user to confirm
47
47
const confirm = await vscode . window . showWarningMessage (
48
- `About to delete ${ items . length } document${ items . length > 1 ? "s" : "" } . Are you sure you want to proceed?` ,
48
+ `About to delete ${
49
+ items . length > 1 ? `${ items . length } documents` : `'${ items [ 0 ] } '`
50
+ } . Are you sure you want to proceed?`,
49
51
"Cancel" ,
50
52
"Confirm"
51
53
) ;
52
54
if ( confirm !== "Confirm" ) {
53
55
// Don't delete without confirmation
54
56
return ;
55
57
}
58
+ deleteList ( items , workspaceFolder , namespace ) ;
59
+ explorerProvider . refresh ( ) ;
56
60
}
57
- deleteList ( items , workspaceFolder , namespace ) ;
58
- explorerProvider . refresh ( ) ;
59
61
} ) ;
60
62
}
You can’t perform that action at this time.
0 commit comments