mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-07 13:14:30 +08:00
@@ -405,12 +405,14 @@ endfunction
|
|||||||
|
|
||||||
" helper function to get the git root. Uses vim-fugitive if available for EXTRA SPEED!
|
" helper function to get the git root. Uses vim-fugitive if available for EXTRA SPEED!
|
||||||
function! s:get_git_root()
|
function! s:get_git_root()
|
||||||
try
|
if exists('*fugitive#repo')
|
||||||
return fugitive#repo().tree()
|
try
|
||||||
catch
|
return fugitive#repo().tree()
|
||||||
let root = split(system('git rev-parse --show-toplevel'), '\n')[0]
|
catch
|
||||||
return v:shell_error ? '' : root
|
endtry
|
||||||
endtry
|
endif
|
||||||
|
let root = split(system('git rev-parse --show-toplevel'), '\n')[0]
|
||||||
|
return v:shell_error ? '' : root
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fzf#vim#gitfiles(args, ...)
|
function! fzf#vim#gitfiles(args, ...)
|
||||||
|
|||||||
Reference in New Issue
Block a user