Skip to content

Commit 5661dea

Browse files
idbriitpope
authored andcommitted
Format the full body instead of separating title
Fix #2315: Gedit strips newlines when commit lacks a blank line %B is the "raw body (unwrapped subject and body)". Since we're displaying both, we can use that to avoid any changes to the message content. %B was added to git in 1.7.2 (2010) in commit 1367b12ad623e28546ba40c435015d94e7fbb248, and fugitive requires 1.8.5 so it's safe to use.
1 parent d0c1a43 commit 5661dea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/fugitive.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3185,7 +3185,7 @@ function! fugitive#BufReadCmd(...) abort
31853185
if b:fugitive_display_format
31863186
call s:ReplaceCmd([dir, 'cat-file', b:fugitive_type, rev])
31873187
else
3188-
call s:ReplaceCmd([dir, '-c', 'diff.noprefix=false', '-c', 'log.showRoot=false', 'show', '--no-color', '-m', '--first-parent', '--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev])
3188+
call s:ReplaceCmd([dir, '-c', 'diff.noprefix=false', '-c', 'log.showRoot=false', 'show', '--no-color', '-m', '--first-parent', '--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%B', rev])
31893189
keepjumps 1
31903190
keepjumps call search('^parent ')
31913191
if getline('.') ==# 'parent '

0 commit comments

Comments
 (0)