Project Manager for Sublime Text 3 . mirror of https://github.com/budRich/ProjectManager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
612 B

import sublime_plugin
class ProjectManagerCloseWindow(sublime_plugin.WindowCommand):
def run(self):
if self.window.project_file_name():
# if it is a project, close the project
self.window.run_command('close_workspace')
else:
self.window.run_command('close_all')
# exit if there are dirty views
if any([v.is_dirty() for v in self.window.views()]):
return
# close the sidebar
self.window.run_command('close_project')
# close the window
self.window.run_command('close_window')