From 44816ef8ff64fb72de376d9e157b12785c6abc5e Mon Sep 17 00:00:00 2001 From: showergum Date: Fri, 11 Apr 2025 23:45:17 -0600 Subject: [PATCH] console.lua: default prompt to an empty string Calling input.select() without a prompt argument was failing due to attempting to concatenate a nil value. Before mpv 0.40 the prompt defaulted to ">" so this is expected to work as evident from the example code. --- player/lua/console.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/lua/console.lua b/player/lua/console.lua index d100714bd2..30610c65e3 100644 --- a/player/lua/console.lua +++ b/player/lua/console.lua @@ -1554,7 +1554,7 @@ mp.register_script_message("get-input", function (script_name, args) input_caller = script_name args = utils.parse_json(args) - prompt = args.prompt + prompt = args.prompt or "" line = args.default_text or "" cursor = tonumber(args.cursor_position) or line:len() + 1 keep_open = args.keep_open