Diff toggling does not work when g:git_messenger_popup_content_margins = v:false. Instead of toggling, diffs are appended to the buffer on every other call.
Proposed Fix
Update blame__reveal_diff() in blame.vim to account for margins. It will pick between ^ diff --git and ^diff --git search patterns when looking for diff_start, depending on the current state of g:git_messenger_popup_content_margins.
Tests
$ THEMIS_VIM=vi ./vim-themis/bin/themis test/all.vimspec
...
ok 25 - git-messenger.vim Popup window diff support toggles file diff on d -> d
ok 26 - git-messenger.vim Popup window diff support toggles file diff on d -> d when margins are off
ok 27 - git-messenger.vim Popup window diff support toggles commit diff on D -> D
ok 28 - git-messenger.vim Popup window diff support toggles commit diff on D -> D when margins are off
...
# tests 61
# passes 58
# pendings 3
Overview
Diff toggling does not work when
g:git_messenger_popup_content_margins = v:false
. Instead of toggling, diffs are appended to the buffer on every other call.Proposed Fix
Update
blame__reveal_diff()
in blame.vim to account for margins. It will pick between^ diff --git
and^diff --git
search patterns when looking fordiff_start
, depending on the current state ofg:git_messenger_popup_content_margins
.Tests