Permalink
Browse files

fixed relative directory problem

  • Loading branch information...
1 parent e4575e4 commit f8db43c6c367a1c94e83f7223f73eb67d9699316 @akiomik committed Mar 7, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 autoload/gitgutter.vim
@@ -110,9 +110,11 @@ endfunction
" get different between HEAD and current
" current: current file path
function! s:get_diff(current)
- let filename = expand("%") " NOTE: %:p だとフルパス
+ let filename = expand("%")
+ let prefix = system('git rev-parse --show-prefix')[ :-2]
+ echo 'git show HEAD:' . prefix . filename . ' | diff - ' . a:current
- let diff = system('git show HEAD:./' . filename . ' | diff - ' . a:current)
+ let diff = system('git show HEAD:' . prefix . filename . ' | diff - ' . a:current)
return split(diff, '\n')
endfunction

0 comments on commit f8db43c

Please sign in to comment.