postcasio / tree-view-open-files

Atom package to show open files in a list above the tree view. (like Sublime Text)
MIT License
27 stars 20 forks source link

if hide and then show whole sidebar, open files never there. #12

Closed thfrlw closed 4 years ago

jstarr commented 9 years ago

I typically use a tall, relatively narrow screen for coding. Frequently hiding the sidebar gives me just enough room to see whole lines without scrolling. Then when showing the sidebar to find another open tab, the pane is missing. The only way to get it back that I have found is to exit atom and restart.

By the way, this is a really useful package. Because of the narrow width of my screen, if there are more than 6 or 7 tabs open, the names in the tabs are truncated to the point it is difficult to recognize their names. Having the pane at the top of the sidebar is really convenient. image

iamso commented 9 years ago

Also missing the open files pane after toggling the tree view. As mentioned above, you can restart atom to get it back, or just disabling and re-enabling the package. But it would still be a lot more helpful, if the pane could remain in place when toggling the tree view.

jgonagle commented 9 years ago

Seems the problem is on lines 21-25 in tree-view-open-files.coffee. The if statement is supposed to detect whether the tree view is visible after a tree-view:toggle event, but is not doing so.

Fortunately, the tree-view:show event is being handled correctly by this package, so I've added the following to my keymap.cson file to mostly fix the problem.

'.platform-win32, .platform-linux':
    'ctrl-\\': 'tree-view:show'
    'ctrl-|': 'tree-view:toggle'

In order to display the tree view with the open files, press ctrl-\ . To hide them, press ctrl-shift-\ (or ctrl-|). The second command is really a toggle since there's no built in command for tree-view for hiding the tree-view (at least that I'm aware of).

This really should be an easy fix for @postcasio, and I know it almost kept me from using this package the first time I tested it out.

k9ordon commented 8 years ago

+1

jronallo commented 8 years ago

This is a duplicate of https://github.com/postcasio/tree-view-open-files/issues/27

This pull request solves the issue for me: https://github.com/postcasio/tree-view-open-files/pull/30