Permalink
Browse files

Make relative path style also relative to home

Update g:Powerline_stl_path_style == 'relative' to be relative to home
(in addition to relative to the cwd) just like the %f statusline item.

Closes #190.
  • Loading branch information...
1 parent ac420bb commit 67ea41ec1deb0c5a5026cfd623994db174906676 @idbrii idbrii committed with Aug 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 autoload/Powerline/Functions.vim
View
2 autoload/Powerline/Functions.vim
@@ -36,7 +36,7 @@ function! Powerline#Functions#GetFilepath() " {{{
let ret = join(extend([fpath[0]], fpath_shortparts), dirsep) . dirsep
elseif g:Powerline_stl_path_style == 'relative'
" Display a relative path, similar to the %f statusline item
- let ret = fnamemodify(filepath, ':.:h') . dirsep
+ let ret = fnamemodify(filepath, ':~:.:h') . dirsep
elseif g:Powerline_stl_path_style == 'full'
" Display the full path, similar to the %F statusline item
let ret = fnamemodify(filepath, ':h') . dirsep

0 comments on commit 67ea41e

Please sign in to comment.