TheSpyder / SyncedSideBar

Sublime Text plugin to sync project sidebar (folder view) with currently active file.
341 stars 23 forks source link

Shows hidden sidebar on focus #17

Closed codepunkt closed 11 years ago

codepunkt commented 11 years ago

Using the latest ST2 build, this plugin shows a previously hidden sidebar when the focus switches from another application back to ST2.

I found this very annoying and it made me deinstall this plugin.

I'd love this to only highlight the currently opened file in the sidebar when the sidebar is opened - and not to auto open it when it is not.

Maybe this could be made optional.

TheSpyder commented 11 years ago

Is this a recent change? I wonder if the ST2 update made this worse. There's a known problem (#6) that forces showing the sidebar when switching tabs.

You can use the command popup (cmd+shift+p on mac, probably ctrl+shift+p on windows) to disable / enable sync easily.

Unfortunately the only thing close to a fix is upgrading to ST3. There are no APIs available in ST2 for the plugin to know when you hide the sidebar.

TheSpyder commented 11 years ago

I've looked into this and the on_activated() event that SyncedSideBar relies on now activates when focus is restored to the application, not just when switching tabs. There is no way for the code to know the difference between the two.

This is a bug in ST2; I'll report it, but there's nothing I can do here. Sorry.

TheSpyder commented 11 years ago

Actually, I gave it some thought and I found a way.