Hi,
Is there a way to detect that ST2 is reopening tabs / continuing a session (hot exit)?
I’ve made the code below (somewhat simplified) but it crashes.
def on_load(self,view):
window = sublime.active_window()
rightIndex = len(window.views()) - 1
window.set_view_index(view, window.active_group(), rightIndex)
window.run_command("select_by_index", {"index": rightIndex})
Apparently, running window.run_command on every reopening tab isn’t possible (too fast?).
Is there a way to detect that ST2 is reopening tabs / continuing a session (hot exit)? My code does not need to run in that case. Or, if that is not possible, could anyone give me advice on how to prevent this code from crashing ST2?
Thanks!