diff --git a/filepicker/filepicker.go b/filepicker/filepicker.go index 2df4032c..5429744b 100644 --- a/filepicker/filepicker.go +++ b/filepicker/filepicker.go @@ -360,7 +360,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { // View returns the view of the file picker. func (m Model) View() string { if len(m.files) == 0 { - return m.Styles.EmptyDirectory.String() + return m.Styles.EmptyDirectory.Height(m.Height).MaxHeight(m.Height).String() } var s strings.Builder @@ -415,6 +415,10 @@ func (m Model) View() string { s.WriteRune('\n') } + for i := lipgloss.Height(s.String()); i <= m.Height; i++ { + s.WriteRune('\n') + } + return s.String() }