aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/peterh/liner/output.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/peterh/liner/output.go')
-rw-r--r--Godeps/_workspace/src/github.com/peterh/liner/output.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/output.go b/Godeps/_workspace/src/github.com/peterh/liner/output.go
index e91f4ea81..049273b53 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/output.go
+++ b/Godeps/_workspace/src/github.com/peterh/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