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

Fall back to WithWaitingStatus if item is scrolled out of view

This commit is contained in:
Stefan Haller
2023-10-19 20:13:00 +02:00
parent 0fd4983c66
commit f99c59b6d5
6 changed files with 39 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/samber/lo"
"github.com/sirupsen/logrus"
)
@ -24,6 +25,7 @@ type ITree[T any] interface {
ToggleShowTree()
GetIndexForPath(path string) (int, bool)
Len() int
GetItem(index int) types.HasUrn
SetTree()
IsCollapsed(path string) bool
ToggleCollapsed(path string)
@ -139,6 +141,11 @@ func (self *FileTree) Len() int {
return self.tree.Size(self.collapsedPaths) - 1 // ignoring root
}
func (self *FileTree) GetItem(index int) types.HasUrn {
// Unimplemented because we don't yet need to show inlines statuses in commit file views
return nil
}
func (self *FileTree) GetAllFiles() []*models.File {
return self.getFiles()
}