Tighten matches for URL buffer names

This commit is contained in:
Tim Pope
2023-02-27 20:50:43 -05:00
parent b54ee90d56
commit e5f9fda842

View File

@@ -157,7 +157,7 @@ endfunction
if exists('+shellslash') 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 function! s:Slash(path) abort
return tr(a:path, '\', '/') return tr(a:path, '\', '/')
@@ -169,7 +169,7 @@ if exists('+shellslash')
else 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 function! s:Slash(path) abort
return a:path return a:path