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.
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).
- 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.
When opening vim with multiple files, e.g. via `vim -o file1 file2`, Vim
fires a `BufEnter` event for each file. However the effective buffer
number (`<abuf>`) is always 1, instead of being each buffer's number in
turn, so we end up processing the first buffer n times instead of each
of n buffers once.
This commit is a brute force workaround to ensure all buffers are
processed if there is more than one.
Closes#428.
Before this change the TabEnter/BufEnter logic was intertwined with
the logic for BufWritePost,FileChangedShellPost.
Separating the concerns fixes a minor bug where a TabEnter-BufEnter
combination led to the plugin not updating the diff the first time the
buffer was written.
"Undo" is a better name than "revert" because:
- "revert" sounds like it has something to do with `git-revert` but they
are entirely different;
- "undo" is consistent with vim's "undo": discarding changes and going
back to the original.
Maintain backwards compatibility and add deprecation warnings.
Closes#306.
Reverts feature introduced in 5c23cadf57
In order to use an escaped grep, please replace
`g:gitgutter_escape_grep=1` with:
let g:gitgutter_grep_command = '\grep --color=never -e'