multiprogress.c: Leave the cursor at the start of the last line.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 01:06:28 +0000 (01:06 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 01:06:28 +0000 (01:06 +0000)
Things still go wrong when stray characters get echoed but it's less
bad.  I think.

multiprogress.c

index 17ba4c0..0594f37 100644 (file)
@@ -574,6 +574,7 @@ int progress_update(struct progress_state *progress)
     item->render(item, &render); progress->last_lines++; f |= f_any;
     if (progress->last_lines > render.height) break;
   }
+  if (f&f_any) put_sequence(tty, tty->cap.cr, 1);
   free_render_state(&render);
   return (0);
 }