sQu1rr / nerd-treeview

Vim-like NERD Tree behaviour for Atom.io Tree View
https://atom.io/packages/nerd-treeview
MIT License
19 stars 5 forks source link

Opening a file with "stay" moves focus to buffer #21

Closed dcalhoun closed 7 years ago

dcalhoun commented 7 years ago

Steps to Reproduce

  1. Open a directory with Atom
  2. Open tree view (C-\)
  3. Open a file with stay...

Stay Examples

Expected Result

Focus remains on tree view.

Actual Result

Focus is placed on the buffer for the selected file.


Environment

sQu1rr commented 7 years ago

Thanks will investigate next week

dcalhoun commented 7 years ago

@sQu1rr Took me awhile, but I believe I've tracked this bug's origin to your addition here. Do you remember why that was added? It seems to prevent "staying" altogether.

I tried removing treeView.unfocus() altogether, but that appears to break much more functionality (e.g. the tree collapses when opening a file, opening a file always creates a new tab).

sQu1rr commented 7 years ago

Hmmm thanks for investigating, sorry the issue has totally slipped my mind. I will see if that can be fixed later this week.

dcalhoun commented 7 years ago

@sQu1rr You're welcome. I actually think I've found the root cause and a proper fix. I'll open a PR shortly.