Sublime Forum

Sidebar view of open files goes bad

#1

I’ve mentioned this problem before in viewtopic.php?f=2&t=18365&start=10#p68375 but maybe it will get more attention here.

There is a bug with sidebar that can be triggered by re-arranging tabs using sublime API.

To reproduce:

  1. Add a directory with a couple of files (2 or more) to the sidebar
  2. Double click one of the files
  3. Single click some other file (triggers preview without adding the file to the list of open files)
  4. Open console and execute:
    sublime.active_window().set_view_index(sublime.active_window().active_view(), 0, 0)
  5. Close previewed file (whose tab was just re-arranged)
  6. Repeat points 3 and 4

View of open files goes bad. See dl.dropboxusercontent.com/u/206 … me-bug.png

1 Like

Sidebar broken _sometimes_
Dev Build 3102
Sidebar folders frequently "messed up"
#2

Ping!

Have to restart Sublime regularly due to this bug.
And as I’ve mentioned, it’s a data loss bug.

0 Likes

#3

Is there some update for this problem?

0 Likes

#4

no

0 Likes

#5

[This issue on github]

See also this related issue and all the issues related to it:

0 Likes

#6

This will be fixed in the next build.

Note that semi-transient views are explicitly not shown in the sidebar, by design. Semi-transient views are created when clicking on a file in the sidebar. It’s both needless to show them in the open files section, as the clicked on file is already highlighted in the sidebar, and if they were shown then the rows in the sidebar would shift around when clicking on files. This is not a good user experience - download an early build of S3 to get a feel for how awkward it is.

0 Likes

#7

@jps in a related note to transient views, most people does not like that a right click trigger the opening of a transient view, it breaks some flows as for example right clicking sidebar to delete a file. example: Don't open the file on right click

0 Likes

#8

Must say that there is a new issue - probably caused by fix for this.

I haven’t had time to analyze it but high level trigger seems to be the https://github.com/bizoo/SortTabs package (it’s on Package Control also).

The steps are:

  1. Install SortTabs
  2. Set “sort_on_load_save” : true,
  3. Go through the directories in the sidebar (opening and closing folders)

Things really go wrong there. I might make a video or something later to show it.

0 Likes

#9

I didn’t have any issues with the current build 3105 so I think the issue is at least partially resolved, but I didn’t use the “sort_on_load_save” feature.

Maybe the sorting of tabs during loading of ST is not a good idea and adding a delay before triggering the first sorting could solve the issue.
So better wait for an answer from @jps

0 Likes

#10

Seems to be very easy to trigger with sort_on_load_save enabled.

Have this in your settings:

{
	"sort_on_load_save" : true,
	"sort_on_load_save_command" : "sort_tabs_by_name",
}

And View -> Side bar -> Show Open Files must be selected.

In the sidebar, expand any folder with multiple files, move mouse over the last file and keep double clicking to open files. Things go bad very quickly. And “bad” means many weird things happening with the sidebar.

0 Likes

#11

@rchl is right, still some issues with my plugin.
After sorting the files (using a manual command, not with the auto option at file load), the OPEN FILES and FOLDERS from sidebar still going crazy (folders structure completely wrong and clicking an opened file doesn’t focus the correct one).

startup, version: 3107 windows x64 channel: dev

0 Likes

#12

Same here, using build 3109 on Linux, and my open files get “eaten” by group headers sometimes when dragging files between groups, resulting in some sort of “off by one” desync between the sidebar and what’s actually visible on the screen (e.g. I have to click above the file I want open). The only fix I’m aware of is to re-open the project.

Happens randomly, haven’t noticed any patterns; being “careful” about dragging (e.g. dropping files only when above other files, stuff like that) doesn’t seem to help. Has been going on for ages now. Haven’t observed this in the Windows version yet (though I use it much less than in my Linux VM).

0 Likes

#13

I’m also having the same problem with build 3114 on El Capitan (OS X).

0 Likes

#14

In 3103 it was present, but ignorable. In 3114 things got really weird (for me at least) and clicking on a file in the sidebar would open some file next to it and select several lines. After that several lines just go missing.

I have turned off the sidebar, I now use these two packages to manage file navigation:
FileBrowser
[Zen Tabs](https://packagecontrol.io/packages/Zen Tabs)

The downside is, of course, that you lose easy project navigation (filters and folders from different places).

0 Likes

#15

Well, I removed all packages that modified the sidebar and tabs. This seems to have corrected the issue. I added some of them back without issue. I’m guessing I had some sublime text 2 packages installed which were the real culprits. I’ve gone a day now without issue.

0 Likes