fix: sluggish mouse scroll
This commit is contained in:
10
main.go
10
main.go
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user