mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
fix issue when switching repos while files refresh
This commit is contained in:
@ -111,7 +111,13 @@ func (node *CommitFileNode) GetNodeAtIndex(index int, collapsedPaths map[string]
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return getNodeAtIndex(node, index, collapsedPaths).(*CommitFileNode)
|
result := getNodeAtIndex(node, index, collapsedPaths)
|
||||||
|
if result == nil {
|
||||||
|
// not sure how this can be nil: we probably are missing a mutex somewhere
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.(*CommitFileNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (node *CommitFileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool) {
|
func (node *CommitFileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool) {
|
||||||
|
@ -97,7 +97,13 @@ func (node *FileNode) GetNodeAtIndex(index int, collapsedPaths map[string]bool)
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return getNodeAtIndex(node, index, collapsedPaths).(*FileNode)
|
result := getNodeAtIndex(node, index, collapsedPaths)
|
||||||
|
if result == nil {
|
||||||
|
// not sure how this can be nil: we probably are missing a mutex somewhere
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.(*FileNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (node *FileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool) {
|
func (node *FileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool) {
|
||||||
|
Reference in New Issue
Block a user