Condense lines

This commit is contained in:
henry.potgieter 2023-03-30 23:24:11 -04:00
parent d900b3a546
commit 6eec6350be

@ -77,38 +77,24 @@ void powerline_char( std::ostringstream & oss, const char dynamic_color[],
case POWERLINE_LEFT: case POWERLINE_LEFT:
if ( eol ) if ( eol )
{ {
oss << bg2fg( dynamic_color ) oss << bg2fg( dynamic_color ) << "#[bg=colour" << write_color << "]";
<< "#[bg=colour"
<< write_color
<< "]";
} }
else else
{ {
oss << dynamic_color oss << dynamic_color << "#[fg=colour" << write_color << "]";
<< "#[fg=colour"
<< write_color
<< "]";
} }
oss << PWL_LEFT_FILLED oss << PWL_LEFT_FILLED << dynamic_color;
<< dynamic_color;
break; break;
case POWERLINE_RIGHT: case POWERLINE_RIGHT:
if ( eol ) if ( eol )
{ {
oss << dynamic_color oss << dynamic_color << "#[fg=colour" << write_color << "] ";
<< "#[fg=colour"
<< write_color
<< "] ";
} }
else else
{ {
oss << bg2fg(dynamic_color) oss << bg2fg(dynamic_color) << " #[bg=colour" << write_color << "]";
<< " #[bg=colour"
<< write_color
<< "]";
} }
oss << PWL_RIGHT_FILLED oss << PWL_RIGHT_FILLED << dynamic_color;
<< dynamic_color;
break; break;
} }
} }