1
0
mirror of https://github.com/amix/vimrc synced 2025-08-03 11:45:00 +08:00

Updated plugins

This commit is contained in:
Amir
2024-10-06 10:25:50 +02:00
parent ee7e062909
commit 46294d589d
202 changed files with 306918 additions and 203617 deletions

View File

@ -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