We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4038769 commit 6443bbdCopy full SHA for 6443bbd
1 file changed
advanced_new_file/commands/delete_file_command.py
@@ -61,15 +61,16 @@ def _delete_file(self, filepath):
61
if vcs_tracking:
62
self._git_rm(filepath)
63
else:
64
- command = self._delete_file_command()
65
- self.window.run_command(command, {"files": [filepath]})
+ self._execute_delete_file(filepath)
66
67
self.refresh_sidebar()
68
69
- def _delete_file_command(self):
+ def _execute_delete_file(self, filepath):
70
if IS_ST3 and self._side_bar_enhancements_installed():
71
- return "side_bar_delete"
72
- return "delete_file"
+ import Default.send2trash as send2trash
+ send2trash.send2trash(filepath)
+ else:
73
+ self.window.run_command("delete_file", {"files": [filepath]})
74
75
def _side_bar_enhancements_installed(self):
76
return "SideBarEnhancements.SideBar" in sys.modules
0 commit comments