mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 22:03:51 -05:00
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:
@@ -5720,7 +5720,7 @@ function! s:GrepOptions(args, dir) abort
|
|||||||
let options = {'name_only': 0, 'name_count': 0, 'line_number': 0}
|
let options = {'name_only': 0, 'name_count': 0, 'line_number': 0}
|
||||||
let tree = s:Tree(a:dir)
|
let tree = s:Tree(a:dir)
|
||||||
let prefix = empty(tree) ? fugitive#Find(':0:', 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
|
let options.prefix = prefix
|
||||||
for arg in a:args
|
for arg in a:args
|
||||||
if arg ==# '--'
|
if arg ==# '--'
|
||||||
|
|||||||
Reference in New Issue
Block a user