1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Collapse/expand all files in tree

Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
This commit is contained in:
Mauricio Trajano
2024-12-26 23:34:08 -05:00
committed by Stefan Haller
parent 14a91d9829
commit 7bea41534b
21 changed files with 276 additions and 0 deletions

View File

@ -36,3 +36,8 @@ func (self *CollapsedPaths) ToggleCollapsed(path string) {
self.collapsedPaths.Add(path)
}
}
func (self *CollapsedPaths) ExpandAll() {
// Could be cleaner if Set had a Clear() method...
self.collapsedPaths.RemoveSlice(self.collapsedPaths.ToSlice())
}