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:
parent
31c2988693
commit
ef2de8201a
@ -1540,15 +1540,15 @@ zoom.text_only:
|
||||
## colors
|
||||
|
||||
colors.completion.fg:
|
||||
default: white
|
||||
default: ["white", "white", "white"]
|
||||
type:
|
||||
name: ListOrValue
|
||||
valtype: QtColor
|
||||
desc: >-
|
||||
Text color of the completion widget.
|
||||
|
||||
May be a single value to specify the color for all columns, or a list
|
||||
specifying a different color for each column.
|
||||
May be a single color to use for all columns or a list of three colors,
|
||||
one for each column.
|
||||
|
||||
colors.completion.odd.bg:
|
||||
default: '#444444'
|
||||
|
@ -400,7 +400,7 @@ class TestConfig:
|
||||
assert not conf._mutables
|
||||
|
||||
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',
|
||||
'keyhint.blacklist',
|
||||
|
Loading…
Reference in New Issue
Block a user