Permalink
Browse files

Fix errors when $HOME contains weird characters

Closes #106.
  • Loading branch information...
Lokaltog committed Mar 4, 2012
1 parent 295b4c3 commit 99277d9eed97a59cacc1db8c1dece2bcfd96d877
Showing with 2 additions and 2 deletions.
  1. +2 −2 autoload/Powerline/Functions.vim
@@ -8,8 +8,8 @@ function! Powerline#Functions#GetFilepath() " {{{
return ''
endif
- let headpath = substitute(expand('%:h'), $HOME, '~', '')
- let fullpath = substitute(expand('%:p:h'), $HOME, '~', '')
+ let headpath = substitute(expand('%:h'), escape($HOME, '\'), '~', '')
+ let fullpath = substitute(expand('%:p:h'), escape($HOME, '\'), '~', '')
let ret = ''
if g:Powerline_stl_path_style == 'short'

0 comments on commit 99277d9

Please sign in to comment.