Browse Source

a work-around to a sidebar bug for showing open files

master
Randy Lai 7 years ago
parent
commit
904ff93720
  1. 11
      pm.py
  2. 6
      pm.sublime-settings

11
pm.py

@ -211,8 +211,17 @@ class Manager:
def check_project(self, project):
wsfile = self.project_workspace(project)
j = JsonFile(wsfile)
if not os.path.exists(wsfile):
JsonFile(wsfile).save({})
j.save({})
else:
show_open_files = self.settings.get("show_open_files", True)
data = j.load({})
data["show_open_files"] = show_open_files
df = data.get("distraction_free", {})
df["show_open_files"] = show_open_files
data["distraction_free"] = df
j.save(data)
def close_project(self, project):
for w in sublime.windows():

6
pm.sublime-settings

@ -8,4 +8,10 @@
// To discover your computer hostname, run
// import sys; sys.modules['Project Manager'].pm.get_node() in your sublime console
// "use_local_projects_dir": true
// it is used to fix a sublime bug:
// https://github.com/SublimeTextIssues/Core/issues/62#issuecomment-42258131
// The work-around is to make sure that all of your projects are configured either
// to Hide Open Files or Show Open Files in the sidebar.
"show_open_files": true
}

Loading…
Cancel
Save