@@ -3,6 +3,7 @@ package files
@@ -91,7 +92,9 @@ func RenderFileList(fileSlice []SessionFile, opts RenderOptions) []string {
91 extraContent := strings.Join(statusParts, " ")
92 extraContent := strings.Join(statusParts, " ")
92 cwd := config.Get().WorkingDir() + string(os.PathSeparator)
93 cwd := config.Get().WorkingDir() + string(os.PathSeparator)
93 filePath := file.FilePath
94 filePath := file.FilePath
94− filePath = strings.TrimPrefix(filePath, cwd)
95+ if rel, err := filepath.Rel(cwd, filePath); err == nil {
95 filePath = fsext.DirTrim(fsext.PrettyPath(filePath), 2)
98 filePath = fsext.DirTrim(fsext.PrettyPath(filePath), 2)
96 filePath = ansi.Truncate(filePath, opts.MaxWidth-lipgloss.Width(extraContent)-2, "…")
99 filePath = ansi.Truncate(filePath, opts.MaxWidth-lipgloss.Width(extraContent)-2, "…")