From: Pasi Kallinen Date: Fri, 26 Mar 2021 15:57:50 +0000 (+0200) Subject: Show extended command name in key help X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54eb25ad2ee10314b8028ced88e7a7cee8271fc2;p=nethack Show extended command name in key help (In the "?f") --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 735acd131..c509b75e0 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -422,6 +422,7 @@ if player managed to get multiple $ items, all but the last could be moved to count could split them into even more slots when a monster on the far side of a closed door opens it, sometimes the hero was told about the monster without it being displayed on the map +also show extended command name when showing what a key does in help Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/cmd.c b/src/cmd.c index f05da5c71..0d571c47d 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -2150,8 +2150,12 @@ key2extcmddesc(uchar key) } /* finally, check whether 'key' is a command */ if (g.Cmd.commands[key]) { - if (g.Cmd.commands[key]->ef_txt) - return g.Cmd.commands[key]->ef_desc; + if (g.Cmd.commands[key]->ef_txt) { + Sprintf(key2cmdbuf, "%s (#%s)", + g.Cmd.commands[key]->ef_desc, + g.Cmd.commands[key]->ef_txt); + return key2cmdbuf; + } } return (char *) 0; }