mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
fix: set model max view to height initially
This commit is contained in:
@@ -212,6 +212,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
|||||||
switch msg := msg.(type) {
|
switch msg := msg.(type) {
|
||||||
case readDirMsg:
|
case readDirMsg:
|
||||||
m.files = msg
|
m.files = msg
|
||||||
|
m.max = m.Height
|
||||||
case tea.WindowSizeMsg:
|
case tea.WindowSizeMsg:
|
||||||
if m.AutoHeight {
|
if m.AutoHeight {
|
||||||
m.Height = msg.Height - marginBottom
|
m.Height = msg.Height - marginBottom
|
||||||
|
|||||||
Reference in New Issue
Block a user