Previously gitgutter could only diff the buffer against the index. This
change enables diffing against the working tree, which will be useful
for stashing.
Use a default with `getbufvar` to not get an empty string.
Fixes:
> Error detected while processing function <SNR>163_on_stderr_nvim[1]..<lambda>10[1]..gitgutter#utility#setbufvar:
> line 1:
> E712: Argument of get() must be a List or Dictionary
I can trigger it using https://github.com/AndrewRadev/linediff.vim when
closing the windows / the tab.
Likely triggered with/through Neomake.
On FocusGained the current tab is force-updated. If there are any other
tabs, we want to make sure they are also force-updated when the user
next switches to them. To do this we set a flag which is read and
cleared on TabEnter.
See #525.
In #303 there was a request to deactivate gitgutter when &diff is set,
although no reason was given initially. Then it was reported that
gitgutter showed signs, in the wrong place, during Fugitive's Gdiff.
However I cannot reproduce signs showing in Gdiff's index buffer. And
the signs in the working tree buffer are correct.
Furthermore the commit which deactivated gitgutter (85f6e136) had the
side-effect of breaking `:redir` and clearing Vim's startup message
(see #500).
Therefore since that change had no benefit, and a couple of drawbacks,
it makes sense to undo it.
Closes#500.
The previous implementation meant the temp file paths were treated as
regular expressions, which was vulnerable to problems with backslashes
etc.
See #494.
This a) logs the message to be seen in `:mess` and b) avoids the
hit-ENTER prompt (which is likely caused by the message not being
logged and Vim deciding that you need to see it then).
So a) fixes b).
This was prevented to avoid an infinite loop on gVim (see #42).
However that was 5 years ago and this no longer seems to be a problem
(even running synchronously).