Skip to content

Commit

Permalink
restore terminal on control+c
Browse files Browse the repository at this point in the history
  • Loading branch information
zunda-arrow committed Jun 1, 2024
1 parent 7c07f6b commit 315a179
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 315a179

Please sign in to comment.