mirror of
https://github.com/thewtex/tmux-mem-cpu-load.git
synced 2026-09-10 07:16:16 -04:00
Don't print trailing whitespace for last element
it's easier to add it in your tmux.conf, then it's to remove it.
This commit is contained in:
parent
39dc52f23c
commit
512185a6b3
|
|
@ -61,7 +61,15 @@ std::string load_string( bool use_colors = false )
|
|||
{
|
||||
// Round to nearest, make sure this is only a 0.00 value not a 0.0000
|
||||
float avg = floorf( static_cast<float>( averages[i] ) * 100 + 0.5 ) / 100;
|
||||
ss << avg << " ";
|
||||
// Don't print trailing whitespace for last element
|
||||
if ( i == nelem-1 )
|
||||
{
|
||||
ss << avg;
|
||||
}
|
||||
else
|
||||
{
|
||||
ss << avg << " ";
|
||||
}
|
||||
}
|
||||
|
||||
if( use_colors )
|
||||
|
|
|
|||
Loading…
Reference in a new issue