mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
support file tree mode on windows
This commit is contained in:
parent
f89c47b83d
commit
21049be233
5 changed files with 28 additions and 33 deletions
|
@ -1,10 +1,6 @@
|
|||
package filetree
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
)
|
||||
|
||||
|
@ -169,8 +165,8 @@ func (s *CommitFileNode) AnyFile(test func(file *models.CommitFile) bool) bool {
|
|||
}
|
||||
|
||||
func (s *CommitFileNode) NameAtDepth(depth int) string {
|
||||
splitName := strings.Split(s.Path, string(os.PathSeparator))
|
||||
name := filepath.Join(splitName[depth:]...)
|
||||
splitName := split(s.Path)
|
||||
name := join(splitName[depth:])
|
||||
|
||||
return name
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue