Fix invalid mouse offset for --height on Windows

This commit is contained in:
Junegunn Choi 2024-06-12 21:18:02 +09:00
parent a1a72bb8d1
commit 0684a20ea3
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -139,7 +139,7 @@ func (r *LightRenderer) findOffset() (row int, col int) {
if err := windows.GetConsoleScreenBufferInfo(windows.Handle(r.outHandle), &bufferInfo); err != nil {
return -1, -1
}
return int(bufferInfo.CursorPosition.X), int(bufferInfo.CursorPosition.Y)
return int(bufferInfo.CursorPosition.Y), int(bufferInfo.CursorPosition.X)
}
func (r *LightRenderer) getch(nonblock bool) (int, bool) {