Corrected the "macro" command so that if no help text has been given

for the key bindings, then the key bindings themselves will be
printed when "macro help" is run, and not just empty strings.
This commit is contained in:
Tim Edwards 2020-06-25 20:59:44 -04:00
parent 28fbb34845
commit 8519d2f13c
2 changed files with 6 additions and 5 deletions

View File

@ -1 +1 @@
8.3.27 8.3.28

View File

@ -1104,7 +1104,7 @@ windDoMacro(w, cmd, interactive)
if (interactive && !cMacro->interactive) continue; if (interactive && !cMacro->interactive) continue;
if (do_help) if (do_help)
cp = cMacro->helptext; cp = (cMacro->helptext == NULL) ? cMacro->macrotext : cMacro->helptext;
else else
cp = cMacro->macrotext; cp = cMacro->macrotext;
@ -1135,10 +1135,11 @@ windDoMacro(w, cmd, interactive)
else else
{ {
if (cMacro->interactive) if (cMacro->interactive)
TxPrintf("Interactive macro '%s' contains \"%s\"\n", TxPrintf("Interactive macro '%s' %s \"%s\"\n",
cn, cp); cn, (do_help) ? "" : "contains", cp);
else else
TxPrintf("Macro '%s' contains \"%s\"\n", cn, cp); TxPrintf("Macro '%s' %s \"%s\"\n",
cn, (do_help) ? "" : "contains", cp);
} }
freeMagic(cn); freeMagic(cn);
any = TRUE; any = TRUE;