Преглед изворни кода

added print to the quit function to clear the terminal

aeth пре 1 месец
родитељ
комит
7b9144d98a
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      pkg/userinterface.go

+ 1 - 0
pkg/userinterface.go

@@ -231,6 +231,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 
 		// These keys should exit the program.
 		case "ctrl+c", "q":
+			fmt.Print("\033[H\033[2J")
 			return m, tea.Quit
 
 		// The "up" and "k" keys move the cursor up