Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix GetShortPath(). #202

Closed
wants to merge 1 commit into from

2 participants

mattn Kim Silkebækken
mattn

A third argument of subsititute is pattern. So if it works on windows, powerline occur errors.
It should use :~.

Kim Silkebækken Lokaltog closed this pull request from a commit
mattn mattn Fix GetShortPath() error on Windows
Closes #202.
2af0748
Kim Silkebækken Lokaltog closed this in 2af0748
Matthew Hinton mhinton referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 23, 2012
  1. mattn

    fix GetShortPath().

    mattn authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  autoload/Powerline/Functions.vim
2  autoload/Powerline/Functions.vim
View
@@ -50,7 +50,7 @@ function! Powerline#Functions#GetFilepath() " {{{
return ret
endfunction " }}}
function! Powerline#Functions#GetShortPath(threshold) " {{{
- let fullpath = split(substitute(expand('%:p:h'), $HOME, '~', 'g'), '/')
+ let fullpath = split(expand('%:~'), '[/\\]')
if len(fullpath) > a:threshold
let fullpath = [fullpath[0], '…'] + fullpath[-a:threshold + 1 :]
Something went wrong with that request. Please try again.