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