Replace empty attributes list with `none`

Tmux-1.6 also thinks that empty value for window-status-…-attr options is
invalid
This commit is contained in:
ZyX 2015-01-16 22:25:03 +03:00
parent 9db1e7b76e
commit 939b2ca013
1 changed files with 4 additions and 2 deletions

View File

@ -148,10 +148,12 @@ def init_environment(pl, args):
if attr == 'attrs':
attrs = attrs_to_tmux_attrs(get_highlighting(group)[attr])
set_tmux_environment(varname, ']#['.join(attrs))
set_tmux_environment(varname + '_LEGACY', ','.join(
set_tmux_environment(varname + '_LEGACY', (','.join(
# Tmux-1.6 does not accept no… attributes in
# window-status-…-attr options.
(attr for attr in attrs if not attr.startswith('no'))))
(attr for attr in attrs if not attr.startswith('no')))
# But it does not support empty attributes as well.
or 'none'))
else:
set_tmux_environment(varname, 'colour' + str(get_highlighting(group)[attr][0]))