Codebase list golang-github-mattn-go-colorable / b568324
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
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
564564 if err != nil {
565565 continue
566566 }
567 if n < 1 {
568 n = 1
569 }
567570 procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
568571 csbi.cursorPosition.x = short(n - 1)
569572 procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))