2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-18 16:52:22 +00:00

ui/termstatus: Fix truncation of status output

The last line was not truncated as expected
This commit is contained in:
Michael Eischer 2023-05-01 18:13:10 +02:00
parent fefe15d7a1
commit bb40e49e75

View File

@ -359,8 +359,9 @@ func (t *Terminal) SetStatus(lines []string) {
line = Truncate(line, width-2)
}
if i < len(lines)-1 { // Last line gets no line break.
lines[i] = line + "\n"
line += "\n"
}
lines[i] = line
}
select {