Fix interactive use of "command script add". (#83350)

There was a think-o in a previous commit that made us only able to
define 1 line commands when using command script add interactively.

There was also no test for this feature, so I fixed the think-o and
added a test.
This commit is contained in:
jimingham
2024-02-28 17:26:29 -08:00
committed by GitHub
parent 0fe4b9dae8
commit 5784bf85bc
3 changed files with 19 additions and 1 deletions

View File

@@ -1417,7 +1417,7 @@ bool ScriptInterpreterPythonImpl::GenerateScriptAliasFunction(
sstr.Printf("def %s (debugger, args, exe_ctx, result, internal_dict):",
auto_generated_function_name.c_str());
if (!GenerateFunction(sstr.GetData(), user_input, /*is_callback=*/true)
if (!GenerateFunction(sstr.GetData(), user_input, /*is_callback=*/false)
.Success())
return false;