Merge pull request #31 from tyru/fix-erase-in-line
Fix: "<CSI>2K" does not erase characters at the bottom
mattn authored 6 years ago
GitHub committed 6 years ago
624 | 624 | cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} |
625 | 625 | count = dword(csbi.size.x - csbi.cursorPosition.x) |
626 | 626 | case 1: |
627 | cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} | |
627 | cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} | |
628 | 628 | count = dword(csbi.size.x - csbi.cursorPosition.x) |
629 | 629 | case 2: |
630 | cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y} | |
630 | cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} | |
631 | 631 | count = dword(csbi.size.x) |
632 | 632 | } |
633 | 633 | procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) |