소스 검색

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