mirror of
https://github.com/mpv-player/mpv.git
synced 2026-05-07 20:02:49 +00:00
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.
This commit is contained in:
committed by
Kacper Michajłow
parent
91337443ad
commit
44816ef8ff
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user