diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-21 16:23:05 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-30 21:57:00 +1100 |
commit | b5a51693721cd386d610cbe81834c3988446d987 (patch) | |
tree | 7910192ca32b55739dae606c76abdb86ff9cb9d5 /pkg/gui/files_panel.go | |
parent | 4b4bfae4f491a1701932cf338711bcee41b989a8 (diff) |
expand to path when switching to tree mode
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 5c0ef9c64..639f2327c 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -848,6 +848,10 @@ func (gui *Gui) handleToggleFileTreeView() error { gui.State.FileChangeManager.ToggleShowTree() + if path != "" { + gui.State.FileChangeManager.ExpandToPath(path) + } + // find that same node in the new format and move the cursor to it if path != "" { index, found := gui.State.FileChangeManager.GetIndexForPath(path) |