Fix metadata panel background fill alignment

This commit is contained in:
vrubelroman 2026-04-24 11:11:03 +03:00
parent 5a27141298
commit 715cbd6e37

View file

@ -1377,13 +1377,16 @@ func renderMetadata(meta vfs.Metadata, palette theme.Palette, width int) string
leftWidth = innerWidth leftWidth = innerWidth
} }
rightWidth := max(innerWidth-leftWidth, 0) rightWidth := max(innerWidth-leftWidth, 0)
columnHeight := max(len(leftRows), len(rightRows))
left := lipgloss.NewStyle(). left := lipgloss.NewStyle().
Width(leftWidth). Width(leftWidth).
Height(columnHeight).
Background(palette.PanelElevated). Background(palette.PanelElevated).
Foreground(palette.Muted). Foreground(palette.Muted).
Render(strings.Join(leftRows, "\n")) Render(strings.Join(leftRows, "\n"))
right := lipgloss.NewStyle(). right := lipgloss.NewStyle().
Width(rightWidth). Width(rightWidth).
Height(columnHeight).
Background(palette.PanelElevated). Background(palette.PanelElevated).
Foreground(palette.Text). Foreground(palette.Text).
Render(strings.Join(rightRows, "\n")) Render(strings.Join(rightRows, "\n"))