This bug was introduced by 9784226 in #708. It had the effect of not
allowing an existing hunk preview window to increase in size for a
larger hunk (up to 'previewheight').
See #775.
I would prefer to remove the statusline altogether in the hunk preview
window, making it consistent with the floating preview window. However
I do not think that is possible; the best one can do is make it blank.
In da77e46310 the function changed to be
consistent with GitGutterGetHunks(), i.e. to show "no data" if called in
a buffer for which gitgutter is inactive.
This function is mostly used in status lines. GitGutter is inactive
when a popup window is open. The commit mentioned above meant that when
a completion window was open, the hunk summary in the status line
changed to show no data. It changed back again once the completion
window was closed, but the overall effect was a little distracting.
This commit reverts the change.
Closes#771.
Vim does not check the existence of its temp directory when generating
file names with tempname(). Therefore if, for some reason, the temp
directory gets deleted, Vim will continue to generate paths for file
names inside the directory. Writes to these file paths will fail
(E482).
See #746, #433, #190, #147.
This reverts "Use fresh temp files for every diff" [1]. At the time I
did not realise that Vim never checks the existence of its temp
directory after creating it at startup; I thought that each call to
tempname() generated a fresh file on disk. In fact tempname() simply
generates a string path.
Therefore there is no point calling tempname() for every diff. Doing so
only serves to generate more files in the temp directory than necessary.
[1] dab840b153
Setting a colorscheme often clears all existing highlight groups. When
the plugin subsequently sets up its colours, it sees that the GitGutter*
groups exist and leaves them alone - even though they have been cleared.
This change means cleared groups do get their colours set up again.
See #727.
When previewing a hunk we re-use any existing preview window. However
we need to reset it for our purposes in case it was used in an
incompatible way before.
See #713.