Change spaces in vim renderer

This commit is contained in:
ZyX 2013-03-30 21:52:05 +04:00
parent 3061738506
commit 854216810e
1 changed files with 9 additions and 9 deletions

View File

@ -76,7 +76,7 @@ class VimRenderer(Renderer):
'window': vim.windows[winidx], 'window': vim.windows[winidx],
'mode': mode, 'mode': mode,
'window_id': window_id, 'window_id': window_id,
} }
segment_info['buffer'] = segment_info['window'].buffer segment_info['buffer'] = segment_info['window'].buffer
segment_info['bufnr'] = segment_info['buffer'].number segment_info['bufnr'] = segment_info['buffer'].number
winwidth = segment_info['window'].width winwidth = segment_info['window'].width
@ -109,7 +109,7 @@ class VimRenderer(Renderer):
'guibg': None, 'guibg': None,
'attr': ['NONE'], 'attr': ['NONE'],
'name': '', 'name': '',
} }
if fg is not None and fg is not False: if fg is not None and fg is not False:
hl_group['ctermfg'] = fg[0] hl_group['ctermfg'] = fg[0]
hl_group['guifg'] = fg[1] hl_group['guifg'] = fg[1]
@ -132,13 +132,13 @@ class VimRenderer(Renderer):
''.join(hl_group['attr']) ''.join(hl_group['attr'])
self.hl_groups[(fg, bg, attr)] = hl_group self.hl_groups[(fg, bg, attr)] = hl_group
vim.command('hi {group} ctermfg={ctermfg} guifg={guifg} guibg={guibg} ctermbg={ctermbg} cterm={attr} gui={attr}'.format( vim.command('hi {group} ctermfg={ctermfg} guifg={guifg} guibg={guibg} ctermbg={ctermbg} cterm={attr} gui={attr}'.format(
group=hl_group['name'], group=hl_group['name'],
ctermfg=hl_group['ctermfg'], ctermfg=hl_group['ctermfg'],
guifg='#{0:06x}'.format(hl_group['guifg']) if hl_group['guifg'] is not None else 'NONE', guifg='#{0:06x}'.format(hl_group['guifg']) if hl_group['guifg'] is not None else 'NONE',
ctermbg=hl_group['ctermbg'], ctermbg=hl_group['ctermbg'],
guibg='#{0:06x}'.format(hl_group['guibg']) if hl_group['guibg'] is not None else 'NONE', guibg='#{0:06x}'.format(hl_group['guibg']) if hl_group['guibg'] is not None else 'NONE',
attr=','.join(hl_group['attr']), attr=','.join(hl_group['attr']),
)) ))
return '%#' + self.hl_groups[(fg, bg, attr)]['name'] + '#' return '%#' + self.hl_groups[(fg, bg, attr)]['name'] + '#'