From ac34143c10625ef3cc4f0258577a5a86ab7ee92b Mon Sep 17 00:00:00 2001 From: SSKUltra Date: Sun, 20 Aug 2017 12:34:52 +0530 Subject: [PATCH] When 'hot_exit = true' and sumblime is restarted, previously open files now reload to get all the highlights and comments back. --- CollaBroText.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CollaBroText.py b/CollaBroText.py index 3ee90f4..01521ba 100644 --- a/CollaBroText.py +++ b/CollaBroText.py @@ -30,6 +30,17 @@ # Throttle class to run on selection modifier +#trying to reload all files when sublime is opened +def plugin_loaded(): + current_window = sublime.active_window() + for view_object in current_window.views(): + file_location = view_object.file_name() + current_window.focus_view(view_object) + current_window.run_command("close") + current_window.open_file(file_location) + + current_window.focus_view(current_window.views()[0]) + class ShiftView(sublime_plugin.EventListener): def on_activated(self,view): # print("View File name is : "+ str(view.file_name()))