Codebase list golang-github-vbauerster-mpb / a688229
isuue #66 comment Vladimir Bauer 5 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
5858 if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {
5959 return 0, 0, err
6060 }
61 // terminal.GetSize from crypto/ssh returns following line with both "+ 1",
62 // but looks like this causing issue #66. Removing both "+ 1" fixed the issue.
63 // return int(info.Window.Right - info.Window.Left + 1), int(info.Window.Bottom - info.Window.Top + 1), nil
61 // terminal.GetSize from crypto/ssh adds "+ 1" to both width and height:
62 // https://go.googlesource.com/crypto/+/refs/heads/release-branch.go1.14/ssh/terminal/util_windows.go#75
63 // but looks like this is a root cause of issue #66, so removing both "+ 1" have fixed it.
6464 return int(info.Window.Right - info.Window.Left), int(info.Window.Bottom - info.Window.Top), nil
6565 }