on main help sign in
fix(ui): calculation bug that would cause modified files to wrap
commit295a62dc389c6a0fd7a9150a140a56b97b70f40f authorChristian Rocha <christian@rocha.is> dateTue 12 May 2026, 15:46 (5 months ago) parente0a8e39
1 file changed+6−1
internal/ui/model/session.go+6−1
internal/ui/model/session.go+6−1
@@ -213,7 +213,12 @@ func fileList(t *styles.Styles, cwd string, filesWithChanges []SessionFile, widt
213213 filePath = rel
214214 }
215215 filePath = fsext.DirTrim(filePath, 2)
216− filePath = ansi.Truncate(filePath, width-(lipgloss.Width(extraContent)-2), "…")
216+ suffix := ""
217+ if extraContent != "" {
218+ suffix = " " + extraContent
219+ }
220+ maxPathWidth := max(width-lipgloss.Width(suffix), 0)
221+ filePath = ansi.Truncate(filePath, maxPathWidth, "…")
217222
218223 line := t.Files.Path.Render(filePath)
219224 if extraContent != "" {