~mdw
/
dvdrip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97da625
)
multiprogress.c (clear_progress): Write the `n - 1' loops in a better way.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 25 Mar 2022 01:19:01 +0000
(
01:19
+0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 25 Mar 2022 18:51:48 +0000
(18:51 +0000)
multiprogress.c
patch
|
blob
|
blame
|
history
diff --git
a/multiprogress.c
b/multiprogress.c
index
b4d1193
..
4d4ae3e
100644
(file)
--- a/
multiprogress.c
+++ b/
multiprogress.c
@@
-427,9
+427,9
@@
static int clear_progress(struct progress_state *progress,
nleave = progress->last_lines - ndel;
}
if (!ndel)
- for (i =
0; i < nleave - 1
; i++) put_sequence(tty, tty->cap.up, 1);
+ for (i =
1; i < nleave
; i++) put_sequence(tty, tty->cap.up, 1);
else {
- for (i =
0; i < ndel - 1
; i++) put_sequence(tty, tty->cap.up, 1);
+ for (i =
1; i < ndel
; i++) put_sequence(tty, tty->cap.up, 1);
put_sequence(tty, tty->cap.cd, ndel);
for (i = 0; i < nleave; i++) put_sequence(tty, tty->cap.up, 1);
}