const cuuAndEd
Vladimir Bauer
5 years ago
| 2 | 2 | import ( |
| 3 | 3 | "bytes" |
| 4 | 4 | "errors" |
| 5 | "fmt" | |
| 6 | 5 | "io" |
| 7 | 6 | "os" |
| 8 | 7 | |
| 12 | 11 | // NotATTY not a TeleTYpewriter error. |
| 13 | 12 | var NotATTY = errors.New("not a terminal") |
| 14 | 13 | |
| 15 | var cuuAndEd = fmt.Sprintf("%c[%%dA%[1]c[J", 27) | |
| 14 | const cuuAndEd = "\x1b[%dA\x1b[J" | |
| 16 | 15 | |
| 17 | 16 | // Writer is a buffered the writer that updates the terminal. The |
| 18 | 17 | // contents of writer will be flushed when Flush is called. |