ui/termstatus: simplify cleaning up on termination

`writeStatus` also cleans no longer used status lines.
The old code actually cleaned one line too much. However, as that line
was never used it makes no difference.
This commit is contained in:
Michael Eischer
2024-01-21 21:16:33 +01:00
parent 6696195f38
commit 6bdca13603
2 changed files with 3 additions and 28 deletions

View File

@@ -39,11 +39,10 @@ func TestSetStatus(t *testing.T) {
term.SetStatus([]string{"quux", "needs\nquote"})
exp += home + clear + "quux\n" +
home + clear + "\"needs\\nquote\"\n" +
home + clear + home + up + up // Third line implicit.
home + clear + home + up + up // Clear third line
cancel()
exp += home + clear + "\n" + home + clear + "\n" +
home + up + up // Status cleared.
exp += home + clear + "\n" + home + clear + home + up // Status cleared
<-term.closed
rtest.Equals(t, exp, buf.String())