Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Commit

Permalink
Clear highlight groups on ColorScheme event
Browse files Browse the repository at this point in the history
Closes #196
Fixes #153
Fixes #194
  • Loading branch information
ZyX-I authored and oferreir committed Feb 18, 2013
1 parent ac8bbfd commit e4777ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions powerline/bindings/vim/plugin/powerline.vim
Expand Up @@ -72,4 +72,5 @@ augroup Powerline
autocmd!
autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter * call s:UpdateWindows(0) | redrawstatus
autocmd CmdwinLeave * call s:UpdateWindows(1)
autocmd ColorScheme * exec s:powerline_pycmd 'powerline.renderer.reset_highlight()'
augroup END
3 changes: 3 additions & 0 deletions powerline/renderers/vim.py
Expand Up @@ -44,6 +44,9 @@ def render(self, winnr, current):
statusline = super(VimRenderer, self).render(mode, winwidth, theme, segments)
return statusline

def reset_highlight(self):
self.hl_groups.clear()

@staticmethod
def escape(string):
return string.replace('%', '%%')
Expand Down

0 comments on commit e4777ff

Please sign in to comment.