mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
get tcell to cleanup the terminal if we panic
This commit is contained in:
@ -14,6 +14,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/jesseduffield/gocui"
|
||||
)
|
||||
|
||||
// SplitLines takes a multiline string and splits it on newlines
|
||||
@ -366,9 +367,8 @@ func ResolveTemplate(templateStr string, object interface{}) (string, error) {
|
||||
func Safe(f func()) {
|
||||
panicking := true
|
||||
defer func() {
|
||||
if panicking {
|
||||
// TODO: close tcell
|
||||
// termbox.Close()
|
||||
if panicking && gocui.Screen != nil {
|
||||
gocui.Screen.Fini()
|
||||
}
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user