From dd4cbf50ea9f2f5163ee350079d97c930c28f0b5 Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 23 Mar 2007 16:42:30 +0000 Subject: Integrated David's manual changes. Fixed help hotkeys so that the appendix hotkeys still work. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1082 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/command.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/command.cc') diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index d8839a5160..04717704c4 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -646,9 +646,10 @@ static void add_file_to_scroller(FILE* fp, formatted_scroller& m, while (fgets(buf, sizeof buf, fp)) { MenuEntry* me = new MenuEntry(buf); - if ((next_is_hotkey && isupper(buf[0])) || (is_first && first_hotkey)) + if ((next_is_hotkey && (isupper(buf[0]) || isdigit(buf[0]))) || + (is_first && first_hotkey)) { - int hotkey = is_first ? first_hotkey : tolower(buf[0]); + int hotkey = is_first ? first_hotkey : buf[0]; if ( !is_first && buf[0] == 'X' && strlen(buf) >= 3 && isdigit(buf[2]) ) { @@ -656,6 +657,8 @@ static void add_file_to_scroller(FILE* fp, formatted_scroller& m, hotkey = buf[2]; } me->add_hotkey(hotkey); + if ( isupper(hotkey) ) + me->add_hotkey(tolower(hotkey)); me->level = MEL_SUBTITLE; me->colour = WHITE; } -- cgit v1.2.3-54-g00ecf