diff --git a/filepicker/filepicker.go b/filepicker/filepicker.go index 6c3b62f..192f293 100644 --- a/filepicker/filepicker.go +++ b/filepicker/filepicker.go @@ -57,7 +57,7 @@ type errorMsg struct { type readDirMsg []os.DirEntry const ( - marginBottom = 6 + marginBottom = 5 fileSizeWidth = 8 paddingLeft = 2 ) @@ -227,12 +227,12 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { switch msg := msg.(type) { case readDirMsg: m.files = msg - m.max = m.Height + m.max = m.Height - 1 case tea.WindowSizeMsg: if m.AutoHeight { m.Height = msg.Height - marginBottom } - m.max = m.Height + m.max = m.Height - 1 case tea.KeyMsg: switch { case key.Matches(msg, m.KeyMap.GoToTop):