Remove code copy-pasted from x/crypto/ssh/terminal

This commit is contained in:
greatroar committed 2020-02-29 18:03:49 +01:00
1 parent 863ba76494
commit c8a672fa29
3 files changed
+7 -28

No files matched your search

+3 -1
View File
@@ -8,6 +8,8 @@ import (
"io"
"os"
"strings"
"golang.org/x/crypto/ssh/terminal"
)
// Terminal is used to write messages and display status lines which can be
@@ -310,7 +312,7 @@ func (t *Terminal) SetStatus(lines []string) {
return
}
width, _, err := getTermSize(t.fd)
width, _, err := terminal.GetSize(int(t.fd))
if err != nil || width <= 0 {
// use 80 columns by default
width = 80