Previously `setup()` was asynchronous in order to run a system command
to check the git version.
As support for v0.8 is dropped, this is no longer required.
When the blame text's length exceeds the available space to
the right of the buffer's text, the intention is to switch
to the 'eol' extmark placement. However, there were a number
of issues that could trip up the time at which it swtiches
to 'eol':
- if the buffer line or virtual text contain multibyte characters,
they weren't counted properly in terms of screen cells that they'd
consume
- incorrect window identifer was passed when calculating the
available space, meaning that signs/folds/numbers columns
weren't properly accounted for
`not` has higher precedence than `~=`,
so it was actually `(not #git_command(..)) ~= 0`.
To fix it, we can simplify the double negation as just a `==`.
Previously when diffing two files where one did not have a newline at
the end of the file, gitsigns was unable to stage such differences since
this information was not captured during the diff stage.
If you run `vim.diff('a', 'a\n')` you get the result:
@@ -1 +1 @@
-a
\ No newline at end of file
+a
However if you run `vim.diff('a', 'a\n', {result_type='indices'})` you
get:
{ {1, 1, 1, 1} }
And since Gitsigns tracks changes as a list of text lines, the
information about a missing newline at the end of the file is not
correctly tracked.
The main consequence of this is that staging hunks which contain these
lines would result in an error as the generated patch would not apply
since it was missing "\ No newline at end of file".
To fix this, the internal hunk object now tracks this end of file
information and patches are now generated correctly.
- Deprecated `next_hunk()` and `prev_hunk()`.
- Can now navigate to the first/last hunk using `nav_hunk('first'|'last')`.
- Added `count` to navigation options. Defaults to `v:count1`.
- Updated recommended keymaps for navigation.
- Navigation actions now navigate to the first non-blank column.