Skip to content

Commit

Permalink
implement itemsHeight()
Browse files Browse the repository at this point in the history
  • Loading branch information
koki-develop committed Apr 6, 2023
1 parent 3f3fca4 commit 14e88f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ func (m *model) inputHeight() int {
return lipgloss.Height(m.inputView())
}

func (m *model) itemsHeight() int {
return min(m.windowHeight-m.inputHeight(), len(m.matches))
}

func (m *model) itemsView() string {
var v strings.Builder

Expand Down

0 comments on commit 14e88f2

Please sign in to comment.