From 5f81aa90a10b2f6016a7c3df318436d5e20ec324 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 4 Oct 2023 15:09:04 -0400 Subject: [PATCH] Remove cleanup function that complicated debuging --- gilo.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/gilo.go b/gilo.go index 1770bdf..3c2e9ba 100644 --- a/gilo.go +++ b/gilo.go @@ -1,26 +1,15 @@ package main import ( - "fmt" - "golang.org/x/term" "os" "timshome.page/gilo/editor" "timshome.page/gilo/terminal" ) -func cleanup(oldState *term.State) { - defer terminal.RawOff(oldState) - - // Recover from panic to allow restoring terminal state - if a := recover(); a != nil { - fmt.Println("RECOVER", a) - } -} - func main() { // Go to proper raw mode, but restore canonical mode at exit oldState := terminal.RawOn() - defer cleanup(oldState) + defer terminal.RawOff(oldState) e := editor.NewEditor()