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).
An alternative would be to run `git` with no user config always, i.e.
setting `GIT_CONFIG_NOSYSTEM` and `HOME=/dev/null` (different for
Windows then) in its environment. Maybe there's an easier way / single
option for this..
This provides `g:gitgutter_hook_context` during the hook's execution and
removes the `:silent`, but uses `exists()` instead.
The bufnr might be necessary to know in the User autocommand, e.g. to
clear some cache.
Not using`:silent` is good practice in general to not hide (wanted)
output and errors etc.
This is to avoid side effects caused by switching to the buffer to be
written and back again.
It also means that the plugin can process any buffer without having to
make it the current buffer.
Using the lower level writefile() function means we have to deal with
line endings. It might also mean we have to deal with (file) encodings
but I hope not...
See #463, #466.
- Treat &previewheight as a maximum height.
- Make preview window shrink to fit the hunk.
- Resize preview window each time.
- Make preview window readonly and nomodifiable.
Based on code by @somini. Thanks!
See #451.
- Hunk stage/undo/preview no longer saves the buffer.
- Hunk undo no longer makes locations go out of sync.
- Grep can be opted out of (grep output with ansi escapes is number one cause
of issues).
- Replaced g:gitgutter_grep_command with g:gitgutter_grep.
- Always runs git-diff the same way instead of in two possible ways.
- Separated detection of git tracking from diffing.
- Simplified path handling.
- Removed support for xolox shell: Windows taskbar does not flash with async
jobs.
- Removed g:gitgutter_{eager,realtime}.
- Simplified implementation generally.
neovim/neovim#5529 merged support for Vim's partial functions, which
made nvim more strict about dictionary functions. This means the
implicit self variable isn't available unless a function is annoted as a
dict function or defined as part of a dictionary.
Closes#392