From 6ae064c5aa1cc24c78abc8d12ec236e99dc01316 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 27 May 2021 10:33:06 -0400 Subject: [PATCH] Tighten match for commit under cursor in temp buffers Closes https://github.com/tpope/vim-fugitive/issues/1756 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c942188..c9e06ab 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -6409,7 +6409,7 @@ function! s:SquashArgument(...) abort if &filetype == 'fugitive' let commit = matchstr(getline('.'), '^\%(\%(\x\x\x\)\@!\l\+\s\+\)\=\zs[0-9a-f]\{4,\}\ze \|^' . s:ref_header . ': \zs\S\+') elseif has_key(s:temp_files, s:cpath(expand('%:p'))) - let commit = matchstr(getline('.'), '\<\x\{4,\}\>') + let commit = matchstr(getline('.'), '\S\@') else let commit = s:Owner(@%) endif