@@ -3,6 +3,7 @@ package files
33import (
44 "fmt"
55 "os"
6+ "path/filepath"
67 "sort"
78 "strings"
89
@@ -91,7 +92,9 @@ func RenderFileList(fileSlice []SessionFile, opts RenderOptions) []string {
9192 extraContent := strings.Join(statusParts, " ")
9293 cwd := config.Get().WorkingDir() + string(os.PathSeparator)
9394 filePath := file.FilePath
94− filePath = strings.TrimPrefix(filePath, cwd)
95+ if rel, err := filepath.Rel(cwd, filePath); err == nil {
96+ filePath = rel
97+ }
9598 filePath = fsext.DirTrim(fsext.PrettyPath(filePath), 2)
9699 filePath = ansi.Truncate(filePath, opts.MaxWidth-lipgloss.Width(extraContent)-2, "…")
97100