mirror of
https://github.com/restic/restic.git
synced 2026-11-10 00:38:40 +00:00
Remove code copy-pasted from x/crypto/ssh/terminal
This commit is contained in:
1 parent
863ba76494
commit
c8a672fa29
3 files changed
+7
-28
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user