mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
command: define-section with empty contents removes a section
This commit is contained in:
parent
9bcc882659
commit
caebbded67
@ -521,6 +521,8 @@ Input Commands that are Possibly Subject to Change
|
||||
``input.conf`` file (except that using the section syntax in it is not
|
||||
allowed), including the need to separate bindings with a newline character.
|
||||
|
||||
If the ``contents`` parameter is an empty string, the section is removed.
|
||||
|
||||
The section with the name ``default`` is the normal input section.
|
||||
|
||||
In general, input sections have to be enabled with the ``enable-section``
|
||||
|
@ -1016,7 +1016,7 @@ void mp_input_define_section(struct input_ctx *ictx, char *name, char *location,
|
||||
// Delete:
|
||||
struct cmd_bind_section *bs = get_bind_section(ictx, bstr0(name));
|
||||
remove_binds(bs, builtin);
|
||||
if (contents) {
|
||||
if (contents && contents[0]) {
|
||||
// Redefine:
|
||||
parse_config(ictx, builtin, bstr0(contents), location, name);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user