mirror of
https://github.com/amix/vimrc
synced 2025-08-03 11:45:00 +08:00
Updated plugins
This commit is contained in:
@ -118,11 +118,16 @@ endfunction
|
||||
" }}}
|
||||
|
||||
|
||||
function! gitgutter#git()
|
||||
" Optional argument is buffer number
|
||||
function! gitgutter#git(...)
|
||||
let git = g:gitgutter_git_executable
|
||||
if a:0
|
||||
let git .= ' -C '.gitgutter#utility#dir(a:1)
|
||||
endif
|
||||
if empty(g:gitgutter_git_args)
|
||||
return g:gitgutter_git_executable
|
||||
return git
|
||||
else
|
||||
return g:gitgutter_git_executable.' '.g:gitgutter_git_args
|
||||
return git.' '.g:gitgutter_git_args
|
||||
endif
|
||||
endfunction
|
||||
|
||||
@ -258,9 +263,7 @@ function! gitgutter#difforig()
|
||||
|
||||
if g:gitgutter_diff_relative_to ==# 'index'
|
||||
let index_name = gitgutter#utility#get_diff_base(bufnr).':'.gitgutter#utility#base_path(bufnr)
|
||||
let cmd = gitgutter#utility#cd_cmd(bufnr,
|
||||
\ gitgutter#git().' --no-pager show '.index_name
|
||||
\ )
|
||||
let cmd = gitgutter#git(bufnr).' --no-pager show '.index_name
|
||||
" NOTE: this uses &shell to execute cmd. Perhaps we should use instead
|
||||
" gitgutter#utility's use_known_shell() / restore_shell() functions.
|
||||
silent! execute "read ++edit !" cmd
|
||||
|
Reference in New Issue
Block a user