mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pw-top: only check terminal size in non-batch mode
If ncurses is not initialized, then the global `LINES` variable stays 0.
This will cause problems because there is an unconditional `if (y > LINES)`
check when printing the driven nodes for a given driver node, resulting
in only the first one being printed.
Commit 71653e04d2 ("pw-top: add 'batch-mode' and iterations known from top")
that introduced batch mode missed this one condition, so fix that
by only checking the for terminal overflow in non-batch mode as
it is done a couple lines above.
Fixes #3899
This commit is contained in:
parent
cf984fcd4c
commit
c12e9a745d
1 changed files with 1 additions and 1 deletions
|
|
@ -577,7 +577,7 @@ static void do_refresh(struct data *d, bool force_refresh)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
print_node(d, &n->info, f, y++);
|
print_node(d, &n->info, f, y++);
|
||||||
if(y > LINES)
|
if(!d->batch_mode && y > LINES)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue