mirror of
https://github.com/octoleo/restic.git
synced 2025-02-09 07:08:28 +00:00
fixed maxlen computation (off by one) on small terminals
This commit is contained in:
parent
4cb8fe3210
commit
f05b0871e9
@ -157,7 +157,7 @@ func (cmd CmdBackup) newArchiveProgress(todo restic.Stat) *restic.Progress {
|
|||||||
|
|
||||||
w, _, err := terminal.GetSize(int(os.Stdout.Fd()))
|
w, _, err := terminal.GetSize(int(os.Stdout.Fd()))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
maxlen := w - len(status2)
|
maxlen := w - len(status2) -1
|
||||||
|
|
||||||
if maxlen < 4 {
|
if maxlen < 4 {
|
||||||
status1 = ""
|
status1 = ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user