fix: set model max view to height initially

This commit is contained in:
Maas Lalani
2023-03-09 14:20:08 -05:00
parent 1ca90b3c94
commit 5db9f39f56
+1
View File
@@ -212,6 +212,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
switch msg := msg.(type) {
case readDirMsg:
m.files = msg
m.max = m.Height
case tea.WindowSizeMsg:
if m.AutoHeight {
m.Height = msg.Height - marginBottom