Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

bad behaviour with Powerline #3

lyokha opened this Issue · 2 comments

2 participants

Alexey Radkov chrisbra
Alexey Radkov


Nice plugin! Only i found that it breaks Powerline status line when :FinishRecovery issued. The problem arises from s:ModifySTL() when argument enable is 0. Actually it tries to restore &stl from value of s:ostl - but this value, created upon plugin's start has nothing to do with value of &stl on :FinishRecovery moment if Powerline is installed - Powerline just changes it to something like %!Pl#Statusline(0,1) and restoring &stl from older s:ostl breaks Powerline status line.

Some workaround could be: store also new value of &stl in variable, say, s:nstl and then, when restoring &stl, check if it changed - if it changed (e.g. By Powerline) then just do nothing.

fu! s:ModifySTL(enable) "{{{1
if a:enable
" Inject some info into the statusline
:let s:ostl=&stl
:let s:nstl=substitute(&stl, '%f', "\0 %{exists('b:mod')?('['.b:mod.']') : ''}", 'g')
:let stl=s:nstl
" Restore old statusline setting
if exists("s:ostl") && s:nstl == &stl
let &stl=s:ostl

This workaround won't break old behaviour and will fix the issue with Powerline (it works for me).

Alexey Radkov

Sorry, there is a typo, printed

:let stl=s:nstl

must be

:let &stl=s:nstl

chrisbra chrisbra referenced this issue from a commit
chrisbra fix issue #3 e582f4f
chrisbra chrisbra closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.