If g:gitgutter_diff_base has been set and the file being processed does
not exist in that branch/commit, ensure that every line is marked as
added - this is how git-diff behaves.
Fixes#855.
For example consider:
-The cat in the hat.
+The ox in the box.
Before this change the highlights would be:
-The cat in the hat.
^^^^^^^^^^^^^^
+The ox in the box.
^^^^^^^^^^^^^
After this change the highlights are:
-The cat in the hat.
^^^ ^^^
+The ox in the box.
^^ ^^^
Another example; before:
-The quick brown fox jumped
+The (quick) brown (fox) jumped
^^^^^^^^^^^^^^^^^^^
And after:
-The quick brown fox jumped
+The (quick) brown (fox) jumped
^ ^ ^ ^
On Vims that support it, signs are placed in the "gitgutter" group with
a priority set by g:gitgutter_sign_priority.
Closes#544.
Closes#576.
Closes#627.
The previous commit switched use of writefile() to binary mode so that
we could prevent a newline being added to a completely empty buffer.
Evidently, however, binary mode has side effects (see #567) so this
commit returns to non-binary mode - with a simpler fix for completely
empty files.
Unfortunately this implementation does not work for noeol files - see
the failing test - because writefile() does not take account of
'nofixeol' (unlike :write). This is suboptimal but acceptable because
noeol files are not be encountered often.
See #567.
This prevents git-ls-files from escaping "unusual" characters in
pathnames. When this happened, gitgutter would feed the escaped name
back to git-show but git-show would not recognise it.
This commit makes git-ls-files use the -z option to output pathnames
verbatim. These pathnames also become null terminated so we have to
ensure we remove the null terminator too.
Closes#562.
The previous implementation meant the temp file paths were treated as
regular expressions, which was vulnerable to problems with backslashes
etc.
See #494.
- 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.