File tree Expand file tree Collapse file tree
advanced_new_file/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
22import sublime
33import sublime_plugin
4+ import sys
45from ..anf_util import *
56from .git .git_command_base import GitCommandBase
67from .command_base import AdvancedNewFileBase
@@ -60,10 +61,19 @@ def _delete_file(self, filepath):
6061 if vcs_tracking :
6162 self ._git_rm (filepath )
6263 else :
63- self .window .run_command ("delete_file" , {"files" : [filepath ]})
64+ command = self ._delete_file_command ()
65+ self .window .run_command (command , {"files" : [filepath ]})
6466
6567 self .refresh_sidebar ()
6668
69+ def _delete_file_command (self ):
70+ if IS_ST3 and self ._side_bar_enhancements_installed ():
71+ return "side_bar_delete"
72+ return "delete_file"
73+
74+ def _side_bar_enhancements_installed (self ):
75+ return "SideBarEnhancements.SideBar" in sys .modules
76+
6777 def close_view (self , filepath ):
6878 file_view = self ._find_open_file (filepath )
6979
You can’t perform that action at this time.
0 commit comments