isuue #66 comment
Vladimir Bauer
5 years ago
| 58 | 58 | if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { |
| 59 | 59 | return 0, 0, err |
| 60 | 60 | } |
| 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. | |
| 64 | 64 | return int(info.Window.Right - info.Window.Left), int(info.Window.Bottom - info.Window.Top), nil |
| 65 | 65 | } |