summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/files_controller.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-30 14:46:46 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commitc084abb378bc4ae2902e52f399c0f53968d1e717 (patch)
tree4f91ae022ae9a0c47042976c3c73f09a47925837 /pkg/gui/controllers/files_controller.go
parent8ea7b7a62e5a09314bbe7a446a45e649d66b524d (diff)
move more view model logic into the files view model
Diffstat (limited to 'pkg/gui/controllers/files_controller.go')
-rw-r--r--pkg/gui/controllers/files_controller.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go
index a27197948..9209a96b3 100644
--- a/pkg/gui/controllers/files_controller.go
+++ b/pkg/gui/controllers/files_controller.go
@@ -653,20 +653,8 @@ func (self *FilesController) handleToggleDirCollapsed() error {
}
func (self *FilesController) toggleTreeView() error {
- // get path of currently selected file
- path := self.getSelectedPath()
-
self.getContext().FileTreeViewModel.ToggleShowTree()
- // find that same node in the new format and move the cursor to it
- if path != "" {
- self.getContext().FileTreeViewModel.ExpandToPath(path)
- index, found := self.getContext().FileTreeViewModel.GetIndexForPath(path)
- if found {
- self.getContext().GetPanelState().SetSelectedLineIdx(index)
- }
- }
-
return self.c.PostRefreshUpdate(self.getContext())
}