mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-07 21:24:40 +08:00
@@ -447,14 +447,7 @@ endfunction
|
|||||||
" GFiles[?]
|
" GFiles[?]
|
||||||
" ------------------------------------------------------------------
|
" ------------------------------------------------------------------
|
||||||
|
|
||||||
" 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()
|
||||||
if exists('*fugitive#repo')
|
|
||||||
try
|
|
||||||
return fugitive#repo().tree()
|
|
||||||
catch
|
|
||||||
endtry
|
|
||||||
endif
|
|
||||||
let root = split(system('git rev-parse --show-toplevel'), '\n')[0]
|
let root = split(system('git rev-parse --show-toplevel'), '\n')[0]
|
||||||
return v:shell_error ? '' : root
|
return v:shell_error ? '' : root
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user