Unified · Split
| @@ -521,6 +521,8 @@ Input Commands that are Possibly Subject to Change · 520 unmodified lines | |||
| 521 | ``input.conf`` file (except that using the section syntax in it is not | 521 | ``input.conf`` file (except that using the section syntax in it is not |
| 522 | allowed), including the need to separate bindings with a newline character. | 522 | allowed), including the need to separate bindings with a newline character. |
| 523 | 523 | ||
| 524 | If the ``contents`` parameter is an empty string, the section is removed. | ||
| 525 | |||
| 524 | The section with the name ``default`` is the normal input section. | 526 | The section with the name ``default`` is the normal input section. |
| 525 | 527 | ||
| 526 | In general, input sections have to be enabled with the ``enable-section`` | 528 | 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, · 1015 unmodified lines | |||
| 1016 | // Delete: | 1016 | // Delete: |
| 1017 | struct cmd_bind_section *bs = get_bind_section(ictx, bstr0(name)); | 1017 | struct cmd_bind_section *bs = get_bind_section(ictx, bstr0(name)); |
| 1018 | remove_binds(bs, builtin); | 1018 | remove_binds(bs, builtin); |
| 1019 | if (contents) { | 1019 | if (contents && contents[0]) { |
| 1020 | // Redefine: | 1020 | // Redefine: |
| 1021 | parse_config(ictx, builtin, bstr0(contents), location, name); | 1021 | parse_config(ictx, builtin, bstr0(contents), location, name); |
| 1022 | } else { | 1022 | } else { |