mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Make Node.path private
This is in preparation for changing the meaning of path in the next commit.
This commit is contained in:
@ -148,12 +148,12 @@ func (self *CommitFileTreeViewModel) ToggleShowTree() {
|
||||
if selectedNode == nil {
|
||||
return
|
||||
}
|
||||
path := selectedNode.Path
|
||||
path := selectedNode.path
|
||||
|
||||
if self.InTreeMode() {
|
||||
self.ExpandToPath(path)
|
||||
} else if len(selectedNode.Children) > 0 {
|
||||
path = selectedNode.GetLeaves()[0].Path
|
||||
path = selectedNode.GetLeaves()[0].path
|
||||
}
|
||||
|
||||
index, found := self.GetIndexForPath(path)
|
||||
@ -170,7 +170,7 @@ func (self *CommitFileTreeViewModel) CollapseAll() {
|
||||
return
|
||||
}
|
||||
|
||||
topLevelPath := strings.Split(selectedNode.Path, "/")[0]
|
||||
topLevelPath := strings.Split(selectedNode.path, "/")[0]
|
||||
index, found := self.GetIndexForPath(topLevelPath)
|
||||
if found {
|
||||
self.SetSelectedLineIdx(index)
|
||||
@ -186,7 +186,7 @@ func (self *CommitFileTreeViewModel) ExpandAll() {
|
||||
return
|
||||
}
|
||||
|
||||
index, found := self.GetIndexForPath(selectedNode.Path)
|
||||
index, found := self.GetIndexForPath(selectedNode.path)
|
||||
if found {
|
||||
self.SetSelectedLineIdx(index)
|
||||
}
|
||||
|
Reference in New Issue
Block a user