fix: sluggish mouse scroll

This commit is contained in:
2026-07-30 14:57:16 +02:00
parent 21d44ea3a1
commit b24669e604
11 changed files with 218 additions and 6 deletions

10
main.go
View File

@@ -204,10 +204,16 @@ func main() {
)
cursorOutput := newTerminalCursorOutput(os.Stdout)
app.cursorOutput = cursorOutput
if _, err := tea.NewProgram(
app,
programOptions := []tea.ProgramOption{
tea.WithAltScreen(),
tea.WithOutput(cursorOutput),
}
if config.Mouse {
programOptions = append(programOptions, tea.WithMouseCellMotion())
}
if _, err := tea.NewProgram(
app,
programOptions...,
).Run(); err != nil {
exitf("run TUI: %v", err)
}