Skip to content

Commit

Permalink
Fix menu items being unnecessarily ellipsized
Browse files Browse the repository at this point in the history
The menu already ellipsizes menu items as needed based on screen size.
  • Loading branch information
aidanholm committed Sep 18, 2019
1 parent 3dea988 commit e6ffb7a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crawl-ref/source/invent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,7 @@ string InvEntry::get_text(bool need_cursor) const
tstr << "(" << glyph_to_tagstr(get_item_glyph(*item)) << ")" << " ";

tstr << text;
const string str = tstr.str();

if (printed_width(str) > get_number_of_cols())
return chop_tagged_string(str, get_number_of_cols() - 2) + "..";
else
return str;
return tstr.str();
}

void get_class_hotkeys(const int type, vector<char> &glyphs)
Expand Down

0 comments on commit e6ffb7a

Please sign in to comment.