From c7e5c821cea1f7e2bfa5cc61f3cada58257c653e Mon Sep 17 00:00:00 2001 From: jremmen Date: Sun, 25 Sep 2016 00:17:10 -0700 Subject: [PATCH] show cwd unless derive --- plugin/vim-ripgrep.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()