get pager working for read action

This commit is contained in:
Travis Shears 2025-10-04 19:53:28 +02:00
parent 360fedbebe
commit 972707e5fd
4 changed files with 97 additions and 388 deletions

View file

@ -113,7 +113,7 @@ func (m model) View() string {
s += m.ui.entryPage.View()
}
s += "\nPress q to quit.\n"
// s += "\nPress q to quit.\n"
return s
}
@ -143,7 +143,13 @@ func Run() {
fmt.Printf("Error checking db connection: %v", err)
os.Exit(1)
}
p := tea.NewProgram(initialModel(config))
p := tea.NewProgram(
initialModel(config),
tea.WithAltScreen(), // use the full size of the terminal in its "alternate screen buffer"
tea.WithMouseCellMotion(), // turn on mouse support so we can track the mouse wheel
)
if _, err := p.Run(); err != nil {
fmt.Printf("Alas, there's been an error: %v", err)
os.Exit(1)