Always use absolute path for :Ggrep quickfix list

Ran into an issue where a running Vim (Neovim 0.9.5) consistently
treated a relative path not as the file in the current directory, but as
a different open buffer that matched the file name.  The relative path
was just for cosmetics; let's switch to absolute so Vim doesn't butcher
it.
This commit is contained in:
Tim Pope
2024-02-08 14:08:06 -05:00
parent e7bf502a6a
commit fab00f7c0f

View File

@@ -5720,7 +5720,7 @@ function! s:GrepOptions(args, dir) abort
let options = {'name_only': 0, 'name_count': 0, 'line_number': 0}
let tree = s:Tree(a:dir)
let prefix = empty(tree) ? fugitive#Find(':0:', a:dir) :
\ s:cpath(getcwd(), tree) ? '' : s:VimSlash(tree . '/')
\ s:VimSlash(tree . '/')
let options.prefix = prefix
for arg in a:args
if arg ==# '--'