summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/invent.cc4
-rw-r--r--crawl-ref/source/stash.cc6
2 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 25da2931c9..34e708f276 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -307,6 +307,10 @@ void InvMenu::load_items(const std::vector<const item_def*> &mitems,
add_entry( procfn? (*procfn)(ie) : ie );
}
}
+
+ // Don't make a menu so tall that we recycle hotkeys on the same page.
+ if (mitems.size() > 52)
+ set_maxpagesize(52);
}
void InvMenu::do_preselect(InvEntry *ie)
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index 8d6fd71f81..2a2f43b0f0 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -421,8 +421,8 @@ bool Stash::show_menu(const std::string &prefix, bool can_travel) const
menu.can_travel = can_travel;
mtitle->quantity = items.size();
menu.set_title(mtitle);
-
menu.load_items( InvMenu::xlat_itemvect(items), stash_menu_fixup);
+
std::vector<MenuEntry*> sel;
while (true)
{
@@ -1454,6 +1454,10 @@ void StashTracker::display_search_results(
mtitle->quantity = results.size();
stashmenu.set_title(mtitle);
+ // Don't make a menu so tall that we recycle hotkeys on the same page.
+ if (results.size() > 52)
+ stashmenu.set_maxpagesize(52);
+
menu_letter hotkey;
for (unsigned i = 0; i < results.size(); ++i, ++hotkey)
{