diff options
Diffstat (limited to 'llgo/third_party/liner/output.go')
-rw-r--r-- | llgo/third_party/liner/output.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llgo/third_party/liner/output.go b/llgo/third_party/liner/output.go index e91f4ea8189..049273b5391 100644 --- a/llgo/third_party/liner/output.go +++ b/llgo/third_party/liner/output.go @@ -31,6 +31,18 @@ func (s *State) eraseScreen() { fmt.Print("\x1b[H\x1b[2J") } +func (s *State) moveUp(lines int) { + fmt.Printf("\x1b[%dA", lines) +} + +func (s *State) moveDown(lines int) { + fmt.Printf("\x1b[%dB", lines) +} + +func (s *State) emitNewLine() { + fmt.Print("\n") +} + type winSize struct { row, col uint16 xpixel, ypixel uint16 |