]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: Actually print left delimiter for columns
authorStefano Brivio <sbrivio@redhat.com>
Mon, 29 Oct 2018 22:04:25 +0000 (23:04 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 31 Oct 2018 15:11:11 +0000 (08:11 -0700)
commit00240899ec0b0bb296ee54860802adec3be0d26e
tree4bff14af83f459fa87499c5827c09a08798555a6
parent45fca4ed94120a480cef70e8199083565f82bd51
ss: Actually print left delimiter for columns

While rendering columns, we use a local variable to keep track of the
field currently being printed, without touching current_field, which is
used for buffering.

Use the right pointer to access the left delimiter for the current column,
instead of always printing the left delimiter for the last buffered field,
which is usually an empty string.

This fixes an issue especially visible on narrow terminals, where some
columns might be displayed without separation.

Reported-by: YoyPa <yoann.p.public@gmail.com>
Fixes: 691bd854bf4a ("ss: Buffer raw fields first, then render them as a table")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Tested-by: YoyPa <yoann.p.public@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
misc/ss.c