From e5f9fda842b9d431a5c3852df4d53408bdbfccbc Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 27 Feb 2023 20:50:43 -0500 Subject: [PATCH] Tighten matches for URL buffer names --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 6e57ee0..b03a8a0 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -157,7 +157,7 @@ endfunction if exists('+shellslash') - let s:dir_commit_file = '\c^fugitive://\%(/[^/]\@=\)\=\(.\{-1,\}\)//\%(\(\x\{40,\}\|[0-3]\)\(/.*\)\=\)\=$' + let s:dir_commit_file = '\c^fugitive://\%(/[^/]\@=\)\=\([^?#]\{-1,\}\)//\%(\(\x\{40,\}\|[0-3]\)\(/[^?#]*\)\=\)\=$' function! s:Slash(path) abort return tr(a:path, '\', '/') @@ -169,7 +169,7 @@ if exists('+shellslash') else - let s:dir_commit_file = '\c^fugitive://\(.\{-\}\)//\%(\(\x\{40,\}\|[0-3]\)\(/.*\)\=\)\=$' + let s:dir_commit_file = '\c^fugitive://\([^?#]\{-\}\)//\%(\(\x\{40,\}\|[0-3]\)\(/[^?#]*\)\=\)\=$' function! s:Slash(path) abort return a:path