- Also make relative time the default time format for current_line_blame_formatter
- When `current_line_blame_formatter` is passed as a function it is no
longer passed an opts argument.
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
The blame cache is now maintained in the CacheEntry object
and invalidated incrementally on buffer updates.
In addition git-blame is bypassed if the cursor line is within a hunk.
Previously current_line_blame would run a git-blame process per line
(via the `-L` flag) in an attempt to be more efficient. However after
some investigation it seems that running git-blame for the entire file
rarely exceeds 2x the time it takes to run for a single line, even for
large files.
This change alters current_line_blame to run git-blame for the entire
file after each buffer edit and caches that in memory. This makes the
first git-blame after an edit ~2x slower, but makes any cursor movements
after that instant.
A follow-up to this would be for current_line_blame to track buffer
updates to avoid the cache needing to be invalidated on every edit.
(experimental)
Uses a second buffer and a floating window in order to display syntax
highlighting in the deleted lines.
Need to set `_inline2 = true` in `setup()` to enable.
- config.current_line_blame_formatter can now be specified as a format
string.
- changed default of `config.current_line_blame_formatter` to
'<author>, <author_time:%R> - <summary>' which is equivalent to the
previous function default.
- deprecated config.current_line_blame_formatter_opts
Resolves#291
When blaming a line on a file, which as the "dos" fileformat
which is also checked in as a "dos" format including the
carriage returns, gitsigns.nvim currently reports
"Not yet commited" caused by an unsucessfull blame call
to git.
This commit fixes that behavior by appending the carriage
return lines again
- blame_line() now takes a table as it's first argument (instead of a
boolean) with the fields "full" and "ignore_whitespace"
- Added config.current_line_blame_opts.ignore_whitespace
Resolves#400