Skip to content
Myr

Disable mouse when exiting due to a panic

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 3dff6d4 · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:tea.go+2 added
323 unmodified lines
324 if p.CatchPanics {325 defer func() {326 if r := recover(); r != nil {327 p.ExitAltScreen()328 p.DisableMouseCellMotion()329 p.DisableMouseAllMotion()330 fmt.Printf("Caught panic:\n\n%s\n\nRestoring terminal...\n\n", r)331 debug.PrintStack()332 return333 }
222 unmodified lines