Sublime Forum

Sidebar not updating when updating the project file manually

#1

I am managing my .sublime-project files manually. Usually when I change something there the sidebar is being reloaded automatically. However, over time some projects get stuck and the only way to reload the sidebar is to close and re-open the project. Event Ctrl+F5 doesn’t reload the sidebar.

So I’m wondering what may be the issue and how to fix it as it is getting really annoying. At this point I have at least a few project being stuck like that.

Sublime latest version.

0 Likes

#2

I think I managed to fix it by manually by updating my .sublime-workspace file:

"buffers":
  [
    {
      "file": "chrome.sublime-project",
...
"groups":
  [
    {
      "sheets":
      [
        {
          "buffer": 0,
          "file": "chrome.sublime-project",

Notice how the .sublime-project file is being referenced with a relative path. Both files reside in the same folder as:

  • chrome.sublime-project
  • chrome.sublime-workspace

Specified like that the sidebar auto-reloads every time I do a change in my .sublime-project file.

However, I noticed that for some projects the .sublime-project file is being referenced with absolute path in those two entries above inside the .sublime-workspace file. In that case the sidebar reloads only when you open up the project for the first time.

Note that my absolute path was going through a symbolic link as well if that makes any difference. Also I’m not sure how exactly Sublime decides to use absolute path or not. Before that I removed the .sublime-workspace file so that Sublime can regenerate it, but it did regenerate it with the same absolute paths inside, so unless I update them manually it is being stuck like that forever.

0 Likes

#3

I think I finally got it …

Here is how it works:

  1. Include the folder containing your .sublime-project file in your project
  2. Open up the project file and close the window
  3. Sublime stores the path to that tab as project-name.sublime-project
  4. Subsequent edits to that project file refresh the sidebar accordingly

Here is how it breaks: (make sure the project file was closed last time, otherwise Sublime will keep the correct name in workspace)

  1. Include the folder containing your .sublime-project file in your project but through a symbolic link
  2. Open up the project file and close the window
  3. Sublime stores the path to that tab as /absolute/path/the-symlink/project-name.sublime-project
  4. Subsequent edits to that project file does not refresh the sidebar

The only way to unstuck it is to:

  1. Include back the folder through the actual path
  2. Close the project file
  3. Close the project
  4. Next time you open that project file it will be saved with project-name.sublime-project correctly and the sidebar will refresh on change

That seems like a bug to me, symbolic links have to be supported fully without some hidden edge cases like this one.

0 Likes