diff --git a/main.go b/main.go index d52c2a7..178108c 100644 --- a/main.go +++ b/main.go @@ -162,14 +162,14 @@ func initialModel() model { listItems[i] = item{title: postInfo.Title, desc: postInfo.Date.String(), index: i} } - list := list.New(listItems, list.NewDefaultDelegate(), 0, 0) - list.Title = "Blog Posts" - w, h, err := term.GetSize(os.Stdout.Fd()) if err != nil { panic(err) } + list := list.New(listItems, list.NewDefaultDelegate(), w, h) + list.Title = "Blog Posts" + // -1 to allow for the initial height of the help model vp := getViewPort(w, h-1)