Closed futile closed 9 years ago
Confirmed. This is caused, because somehow no autocommand is triggered when going back to the current version. I have reported it in https://github.com/tpope/vim-fugitive/issues/421 - maybe you can help there to fix this?
To work around this, you can use :DimInactiveRefresh
.
With the latest changes to restore custom &colorcolumn
settings this might fail, but then :set colorcolumn=
usually should work.
Apart from that, I am using :Gdiff
very often, but am not affected:
I use the following to keep the cursor in the current version's window: https://github.com/tpope/vim-fugitive/pull/429 and a custom mapping to toggle the diff, which might be involved in the workaround also: https://github.com/blueyed/dotfiles/blob/d2f75a3c847d57885bed8f477fb6a65db27da542/vimrc#L1705-L1736
I thought I had tried :DimInactiveRefresh
earlier and it didn't work, but now it does, so that is a good quickfix.
I reported the missing WinEnter/BufEnter events in fugitive issue 421. Your custom mapping seems to do a diffoff
before closing the window, which then to correctly trigger the *Enter events. That might be why your mapping does not prevent the events.
This should be fixed in the meantime.
Re-opening: this is a bug in fugitive: https://github.com/tpope/vim-fugitive/issues/421 (PR is pending)
btw: diff windows are excluded since a while from getting dimmed already - added shortly after you've created this issue (11e4d8b).
Should be fixed in fugitive now, via https://github.com/tpope/vim-fugitive/commit/e065e4f841f4a033ac9a6156573a446007617b1d.
I don't know if this is a problem with fugitive or vim-diminactive, but here is how to reproduce the problem:
:Gdiff
(requires fugitive)DimInactiveOff
does not make the window active again.I think step 2 is optional. I actually had to close and reopen vim to get to a non-dimmed version of my file again.