Merge pull request #42 from ncw/fix-40
Make move to start of line with 0 parameter work - Fixes #40
mattn authored 4 years ago
GitHub committed 4 years ago
564 | 564 | if err != nil { |
565 | 565 | continue |
566 | 566 | } |
567 | if n < 1 { | |
568 | n = 1 | |
569 | } | |
567 | 570 | procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) |
568 | 571 | csbi.cursorPosition.x = short(n - 1) |
569 | 572 | procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) |