aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/peterh/liner/output_windows.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-02-11 22:16:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-02-11 22:16:52 +0800
commitb019f3ee29ce55c3d515ee8bafe0f4bb14221c0a (patch)
tree26e023be6c99a10e82a5a0ebadd1e42cefe9bd3c /Godeps/_workspace/src/github.com/peterh/liner/output_windows.go
parentb05e472c076d30035233d6a8b5fb3360b236e3ff (diff)
downloadgo-tangerine-b019f3ee29ce55c3d515ee8bafe0f4bb14221c0a.tar
go-tangerine-b019f3ee29ce55c3d515ee8bafe0f4bb14221c0a.tar.gz
go-tangerine-b019f3ee29ce55c3d515ee8bafe0f4bb14221c0a.tar.bz2
go-tangerine-b019f3ee29ce55c3d515ee8bafe0f4bb14221c0a.tar.lz
go-tangerine-b019f3ee29ce55c3d515ee8bafe0f4bb14221c0a.tar.xz
go-tangerine-b019f3ee29ce55c3d515ee8bafe0f4bb14221c0a.tar.zst
go-tangerine-b019f3ee29ce55c3d515ee8bafe0f4bb14221c0a.zip
Godeps: update all dependencies to latest code
Diffstat (limited to 'Godeps/_workspace/src/github.com/peterh/liner/output_windows.go')
-rw-r--r--Godeps/_workspace/src/github.com/peterh/liner/output_windows.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/peterh/liner/output_windows.go b/Godeps/_workspace/src/github.com/peterh/liner/output_windows.go
index 27ae55a14..45cd978c9 100644
--- a/Godeps/_workspace/src/github.com/peterh/liner/output_windows.go
+++ b/Godeps/_workspace/src/github.com/peterh/liner/output_windows.go
@@ -47,6 +47,24 @@ func (s *State) eraseScreen() {
procSetConsoleCursorPosition.Call(uintptr(s.hOut), 0)
}
+func (s *State) moveUp(lines int) {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ procSetConsoleCursorPosition.Call(uintptr(s.hOut),
+ uintptr(int(sbi.dwCursorPosition.x)&0xFFFF|(int(sbi.dwCursorPosition.y)-lines)<<16))
+}
+
+func (s *State) moveDown(lines int) {
+ var sbi consoleScreenBufferInfo
+ procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))
+ procSetConsoleCursorPosition.Call(uintptr(s.hOut),
+ uintptr(int(sbi.dwCursorPosition.x)&0xFFFF|(int(sbi.dwCursorPosition.y)+lines)<<16))
+}
+
+func (s *State) emitNewLine() {
+ // windows doesn't need to omit a new line
+}
+
func (s *State) getColumns() {
var sbi consoleScreenBufferInfo
procGetConsoleScreenBufferInfo.Call(uintptr(s.hOut), uintptr(unsafe.Pointer(&sbi)))