Fix colors.completion.fg default and description.

Update the description to mention the number of columns and change the
default to ["white", "white", "white"] to make it more obvious that
multiple colors can be specified. This also satisfies the config test
that expects the default value for ListOrValue types to be a list.

One other test had to be tweaked to use a config option that is still
just a QtColor rather than a ListOrValue.

While it is possible to provide just two colors, it is "undefined
behavior". It will use the first color as the third color, but that is
an artifact of the implementation and therefore not documented (though
also not an error, as it is harmless).
This commit is contained in:
Ryan Roden-Corrent 2017-12-18 07:58:26 -05:00
parent 31c2988693
commit ef2de8201a
2 changed files with 4 additions and 4 deletions

View File

@ -1540,15 +1540,15 @@ zoom.text_only:
## colors ## colors
colors.completion.fg: colors.completion.fg:
default: white default: ["white", "white", "white"]
type: type:
name: ListOrValue name: ListOrValue
valtype: QtColor valtype: QtColor
desc: >- desc: >-
Text color of the completion widget. Text color of the completion widget.
May be a single value to specify the color for all columns, or a list May be a single color to use for all columns or a list of three colors,
specifying a different color for each column. one for each column.
colors.completion.odd.bg: colors.completion.odd.bg:
default: '#444444' default: '#444444'

View File

@ -400,7 +400,7 @@ class TestConfig:
assert not conf._mutables assert not conf._mutables
def test_get_obj_simple(self, conf): def test_get_obj_simple(self, conf):
assert conf.get_obj('colors.completion.fg') == 'white' assert conf.get_obj('colors.completion.category.fg') == 'white'
@pytest.mark.parametrize('option', ['content.headers.custom', @pytest.mark.parametrize('option', ['content.headers.custom',
'keyhint.blacklist', 'keyhint.blacklist',