diff --git a/plugin/vim-ripgrep.vim b/plugin/vim-ripgrep.vim index e4f649c..0c9d1d7 100644 --- a/plugin/vim-ripgrep.vim +++ b/plugin/vim-ripgrep.vim @@ -91,7 +91,11 @@ fun! s:RgHasFile(path) endfun fun! s:RgShowRoot() - echo s:RgRootDir() + if exists('g:rg_derive_root') + echo s:RgRootDir() + else + echo getcwd() + endif endfun command! -nargs=* Rg :call s:Rg()