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> {
4242 )
4343 )
4444 . 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
4747 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?`,
4951 "Cancel" ,
5052 "Confirm"
5153 ) ;
5254 if ( confirm !== "Confirm" ) {
5355 // Don't delete without confirmation
5456 return ;
5557 }
58+ deleteList ( items , workspaceFolder , namespace ) ;
59+ explorerProvider . refresh ( ) ;
5660 }
57- deleteList ( items , workspaceFolder , namespace ) ;
58- explorerProvider . refresh ( ) ;
5961 } ) ;
6062}
You can’t perform that action at this time.
0 commit comments