Ver código fonte

restore cursor position

Yasuhiro Matsumoto 9 anos atrás
pai
commit
22a0a28efd
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      colorable_windows.go

+ 2 - 0
colorable_windows.go

@@ -482,6 +482,7 @@ loop:
 			if err != nil {
 				continue
 			}
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			var cursor coord
 			switch n {
 			case 0:
@@ -500,6 +501,7 @@ loop:
 			if err != nil {
 				continue
 			}
+			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
 			var cursor coord
 			switch n {
 			case 0: