From 315a179ea0b318002bfddec4fa98c12918fd2f41 Mon Sep 17 00:00:00 2001 From: Lunarmagpie Date: Fri, 31 May 2024 23:49:27 -0400 Subject: [PATCH] restore terminal on control+c --- tui/tui.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tui/tui.go b/tui/tui.go index 1d80b19..7e940d5 100644 --- a/tui/tui.go +++ b/tui/tui.go @@ -169,6 +169,7 @@ func (self *Tui) handleInput(symbol []int) { // Control + C if reflect.DeepEqual(symbol, []int{3}) { + term.Restore(int(os.Stdin.Fd()), &self.termState) os.Exit(1) }