fix: size of list
This commit is contained in:
6
main.go
6
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)
|
||||
|
||||
|
Reference in New Issue
Block a user