diff --git a/src/display.cpp b/src/display.cpp index 12d6ae44..a5b86b83 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -38,7 +38,13 @@ std::string Display::Columns() for (std::vector::const_iterator it = Config.columns.begin(); it != Config.columns.end(); ++it) { - width = last_fixed && it == next2last ? COLS-where-(++next2last)->width : (it->width*(it->fixed ? 1 : COLS/100.0)); + width = (last_fixed && it == next2last + ? COLS-where-(++next2last)->width + : (it == Config.columns.end()-1 + ? COLS-where + : (it->width*(it->fixed ? 1 : COLS/100.0)) + ) + ); switch (it->type) { @@ -130,7 +136,14 @@ void Display::SongsInColumns(const MPD::Song &s, void *, Menu *menu) *menu << clEnd; } - width = last_fixed && it == next2last ? COLS-where-(++next2last)->width : (it->width*(it->fixed ? 1 : COLS/100.0)); + width = (last_fixed && it == next2last + ? COLS-where-(++next2last)->width + : (it == Config.columns.end()-1 + ? menu->GetWidth()-where + : (it->width*(it->fixed ? 1 : COLS/100.0)) + ) + ); + MPD::Song::GetFunction get = 0; switch (it->type)