]> granicus.if.org Git - nethack/commitdiff
Show extended command name in key help
authorPasi Kallinen <paxed@alt.org>
Fri, 26 Mar 2021 15:57:50 +0000 (17:57 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 26 Mar 2021 15:57:59 +0000 (17:57 +0200)
(In the "?f")

doc/fixes37.0
src/cmd.c

index 735acd131e48aa03f944b792c308ddc5c8803e0e..c509b75e0c20e547403761f88f5a768baed6835a 100644 (file)
@@ -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
index f05da5c71df2704c504b540b6aa638021dc9edbf..0d571c47d13bbbff8af9d04d569de2badb312a52 100644 (file)
--- 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;
 }