mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
console.lua: fix completing empty --dscale and --cscale
These options accept an empty value within their choices. If the user didn't add manually input a quote before completing them, add quotes automatically so that the blank value can actually be used.
This commit is contained in:
parent
dd77d0a7da
commit
7362f72fdf
@ -1220,6 +1220,11 @@ local function handle_choice_completion(option, before_cur, path_pos)
|
||||
return handle_file_completion(before_cur, path_pos)
|
||||
end
|
||||
|
||||
-- Fix completing the empty value for --dscale and --cscale.
|
||||
if info.choices and info.choices[1] == '' and completion_append == '' then
|
||||
info.choices[1] = '""'
|
||||
end
|
||||
|
||||
return info.choices, before_cur
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user