1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

don't needlessly load every file

This commit is contained in:
Jesse Duffield
2020-08-22 17:17:08 +10:00
parent 8be970e688
commit 30a555b108
2 changed files with 6 additions and 11 deletions

View File

@ -211,13 +211,13 @@ func (p *PatchManager) RenderAggregatedPatchColored(plain bool) string {
return result
}
func (p *PatchManager) GetFileStatus(filename string) (int, error) {
info, err := p.getFileInfo(filename)
if err != nil {
return 0, err
func (p *PatchManager) GetFileStatus(filename string) int {
info, ok := p.fileInfoMap[filename]
if !ok {
return UNSELECTED
}
return info.mode, nil
return info.mode
}
func (p *PatchManager) GetFileIncLineIndices(filename string) ([]int, error) {