The SublimeRestart plugin restarts ST3 on Windows like this:
subprocess.call('taskkill /im sublime_text.exe /f && cmd /C "'+ os.path.join(os.getcwd(), 'sublime_text.exe') + '"', shell=True)
Full code] The problem is, when Sublime restarts, the active project is the one from the last time Sublime was properly exited.
Changing it to
self.window.run_command('exit')
subprocess.call(os.path.join(os.getcwd(), 'sublime_text.exe'))
Full code] causes it to hang for 20-30 seconds before exiting, and then does not restart it at all.
Is there a way to do something like this?
self.window.run_command('save_current_project_state')
subprocess.call('taskkill /im sublime_text.exe /f && cmd /C "'+ os.path.join(os.getcwd(), 'sublime_text.exe') + '"', shell=True)
Or to just handle this in a different way?
Thanks.