From b8b0518e9bf958e808e170b7da2577ee076c731e Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 23 Feb 2013 00:49:48 +0400 Subject: [PATCH] Replace 'NONE' with None for guifg/guibg. No need in having string keys if we are in any case checking this for equality later instead of embedding them as-is like cterm* --- powerline/renderers/vim.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/powerline/renderers/vim.py b/powerline/renderers/vim.py index 145e180e..6d31fa92 100644 --- a/powerline/renderers/vim.py +++ b/powerline/renderers/vim.py @@ -68,9 +68,9 @@ class VimRenderer(Renderer): if not (fg, bg, attr) in self.hl_groups: hl_group = { 'ctermfg': 'NONE', - 'guifg': 'NONE', + 'guifg': None, 'ctermbg': 'NONE', - 'guibg': 'NONE', + 'guibg': None, 'attr': ['NONE'], 'name': '', } @@ -98,9 +98,9 @@ class VimRenderer(Renderer): vim.command('hi {group} ctermfg={ctermfg} guifg={guifg} guibg={guibg} ctermbg={ctermbg} cterm={attr} gui={attr}'.format( group=hl_group['name'], ctermfg=hl_group['ctermfg'], - guifg='#{0:06x}'.format(hl_group['guifg']) if hl_group['guifg'] != 'NONE' else 'NONE', + guifg='#{0:06x}'.format(hl_group['guifg']) if hl_group['guifg'] is not None else 'NONE', ctermbg=hl_group['ctermbg'], - guibg='#{0:06x}'.format(hl_group['guibg']) if hl_group['guibg'] != 'NONE' else 'NONE', + guibg='#{0:06x}'.format(hl_group['guibg']) if hl_group['guibg'] is not None else 'NONE', attr=','.join(hl_group['attr']), )) return '%#' + self.hl_groups[(fg, bg, attr)]['name'] + '#'