From fab00f7c0f3a08e860e39c7adeb8fbe849921a98 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 8 Feb 2024 14:08:06 -0500 Subject: [PATCH] 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. --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 3d6b0c6..dd0cfa3 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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 ==# '--'