Yasuhiro Matsumoto преди 8 години
родител
ревизия
3fa8c76f9d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      colorable_windows.go

+ 2 - 2
colorable_windows.go

@@ -472,7 +472,7 @@ loop:
 				continue
 			}
 			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
-			csbi.cursorPosition.x -= short(n)
+			csbi.cursorPosition.x += short(n)
 			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'D':
 			n, err = strconv.Atoi(buf.String())
@@ -480,7 +480,7 @@ loop:
 				continue
 			}
 			procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
-			csbi.cursorPosition.x += short(n)
+			csbi.cursorPosition.x -= short(n)
 			procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
 		case 'E':
 			n, err = strconv.Atoi(buf.String())