commits
New diff based `show` should have used the exact same expression as the
`resolve_rename` code. Fixed and cleaned up a bit to no longer do
`target + 2` which was there since the natural thing was to refer to the
parent of the commit.
Ends up being a more general solution that the file show on the parent,
which can fail in some cases (e.g. merges).
Slightly more code to implement per VCS, but allows for much richer
behavior.
This should allow for per VCS instance fields/state.
I'm surprised this didn't became an issue sooner.
Fixes #18.
Manifested as odd "O count delete above" signs.
It's a silly bug from me not still not being lua brained.
This is intended for users who want to keep the VCSigns at the leftmost
position, to get nice alignment, independent of the presence of other
signs.
Fixes #19
This tries to avoid some error-prone hackery where empty strings were
special and meant (effectively) non-existent files.
In the new state the work is done on lists of lines, so
* non-existent file -> {}
* "empty" file according to vim -> {""}
* non-empty file -> {"line1", "line2", ...}
Not used in any current implementation, but is a piece of data that can
be useful/needed. I personally needed it for an implementation at work.
I did not expext that to be possible, but apparently it is.
Turns out line matching gets really expensive for the finer diffs.
Because of the `default = true` option, the fallback highlight groups
were being set linked to the first highlight in the list even if it did
not exist and the rest of the list was ignored.
This updates the function to check if the highlight exists before
linking.
The code used (adapted from vim-signify) did not handle matchlines diffs
well, where signs can easily overlap.
This rewrite collects all signs that we would like to place,
apply some rewrites to try to avoid sign overlapping,
and then places combined signs in the buffer.
The breaking config change comes a different setup wrt signs and highlights
which decouples the signs from the highlights.
* There are signs for add, change, delete_below, delete_above.
* There are highlights for add, change, delete, change_delete.
A specific change-delete sign can also be provided to not use combined symbols.
This seems to be the correct order for hunks on the same plus line.
The code used (adapted from vim-signify) did not handle matchlines diffs
well, where signs can easily overlap.
This rewrite collects all signs that we would like to place,
apply some rewrites to try to avoid sign overlapping,
and then places combined signs in the buffer.
The breaking config change comes a different setup wrt signs and highlights
which decouples the signs from the highlights.
* There are signs for add, change, delete_below, delete_above.
* There are highlights for add, change, delete, change_delete.
A specific change-delete sign can also be provided to not use combined symbols.