Handle tabs in commit subject

References https://github.com/tpope/vim-fugitive/pull/1713
This commit is contained in:
Tim Pope
2021-03-24 14:19:37 -04:00
parent 11b824a0ee
commit 0205ae8d45

View File

@@ -1702,8 +1702,8 @@ endfunction
function! s:QueryLog(refspec) abort
let lines = s:LinesError(['log', '-n', '256', '--pretty=format:%h%x09%s', a:refspec, '--'])[0]
call map(lines, 'split(v:val, "\t")')
call map(lines, '{"type": "Log", "commit": v:val[0], "subject": v:val[-1]}')
call map(lines, 'split(v:val, "\t", 1)')
call map(lines, '{"type": "Log", "commit": v:val[0], "subject": join(v:val[1 : -1], "\t")}')
return lines
endfunction