Goto destroys the tree view
When you use goto, and are located in a tree view, even if the node to visit is a file or directory in the currently opened tree root (same level) the tree view is canceled, leading to a loss of all expanded nodes' states. Further more imo goto should work in tree view, if the node is visible, put the cursor on that node, if not visible it should expand the tree view to make the node visible.
It was never declared that :goto preserves tree-view and it never did, so this isn't a bug. However, it probably wasn't a conscious decision to not preserve custom or tree views. I say "probably" because it's a matter of using 1 instead of 0 in https://github.com/vifm/vifm/commit/19a1f626fa7c2c88a90ef126a4f26a4b1e5b7ba8#diff-0982b2e2a361e13534633f92f50cc209ad43944dbf1696ed055d353fa0cd4d2fR2361.
if not visible it should expand the tree view to make the node visible.
This is harder and not possible if a path doesn't belong to the subtree or is behind a symbolic link (although symlinks to directories could be expandable).
I see, but assuming the goto action shares the same root as the current view, it stand to reason that the goto target should be under the current view, if not, then the tree view can be destroyed/changed. It would be great if the tree view is treated as a more first class citizen like the default flat view. I can see that in my workflow i like to stay much more in a tree view and in a given directory and move around the tree levels, instead of up/down in the default flat view. However if you go back from the current root a level (with gh) or down (with gl), then try to go back to the original root that we were just in, the expanded view/state is lost, which is cumbersome.
:goto now keeps the tree or custom view if a file can be found in the list.
Expanding folds can be done in the future.
However if you go back from the current root a level (with gh) or down (with gl), then try to go back to the original root that we were just in, the expanded view/state is lost, which is cumbersome.
One user wanted an ability to recall closed custom views, sounds like this might be related if you want to go back to a tree which is gone.