Skip to content

Commit

Permalink
fix body duplicates in popup when showing diff (fixes #35)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Aug 20, 2019
1 parent 4bc69bd commit 72975c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autoload/gitmessenger/blame.vim
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ function! s:blame__after_diff(next_diff, git) dict abort
return
endif

" When getting diff with `git show --pretty=format:%b`, it may contain
" commit body. By removing line until 'diff --git ...' line, the body is
" removed (#35)
while a:git.stdout !=# [] && stridx(a:git.stdout[0], 'diff --git ') !=# 0
let a:git.stdout = a:git.stdout[1:]
endwhile

call self.append_lines(a:git.stdout)
let self.state.diff = a:next_diff

Expand Down

0 comments on commit 72975c9

Please sign in to comment.