| Age | Commit message (Collapse) | Author |
|
With `interactive.diffFilter = delta --color-only` delta is called
by e.g. `git add -p`, but in this mode git hides the terminal from
the pager.
Plus/minus lines correctly use ANSI sequences to paint up to to the
end of the line, but zero lines always use spaces. This needs the terminal
width, but it is not available for diffFilter. So the fallback
of 80 is used, and zero styles did not extend to the full terminal width.
Since zero lines are only rarely styled (e.g. via
`--zero-style='syntax "#1d1f21" dim'`), this was never noticed.
This also crashed delta when a zero line was longer than 80.
|
|
|
|
|
|
Output can be generated directly via Painter::write, or Painter::output_buffer.
The latter must be emit()'ed before the former method can be used again,
otherwise the order is incorrect.
Tests added. Fixes #1504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- make explicit mention of which bat version should be installed in the
"Installation" and "Supported languages and themes" sections of the
manual
- add missing "Tips & tricks" page
See https://github.com/dandavison/delta/issues/1712 for context.
|
|
Signed-off-by: Rui Chen <rui@chenrui.dev>
|
|
|
|
|
|
take() and pass it to BufReader so it gets closed when the reader stops.
Otherwise on an early pager (EPIPE), and thus delta() exit the feeding
subcommand still has an open stdout to write something into and
wait()-ing on it hangs.
|
|
* Support external subcommands: rg, git show, git log (etc.)
The possible command line now is:
delta <delta-args> [SUBCMD <subcmd-args>]
If the entire command line fails to parse because SUBCMD is unknown,
then try (until the next arg fails) parsing <delta-args> only,
and then parse and call SUBCMD.., its output is piped into delta.
Other subcommands also take precedence over the diff/git-diff mode
(`delta a b`, where e.g. a=git and b=show), and any diff call gets
converted into an external subcommand first.
Available are:
delta rg .. => rg --json .. | delta
delta a b .. => git diff a b .. | delta
delta git show .. => git <color-on> show .. | delta
and all other git-CMDS, of which
add -p, blame, checkout -p, diff, grep, log -p, reflog -p, and stash show -p
produce a diff.
Because --json is automatically added for `delta rg ..`, it avoids the
parsing ambiguities of and is easier to type than `rg .. | delta`.
The piping is not done by the shell, but delta, so the subcommands
are now child processes of delta.
* Set calling process directly because delta started it
This info then takes precedence over whatever
start_determining_calling_process_in_thread() finds or rather
doesn't find.
(The simple yet generous SeqCst is used on purpose for the atomic operations.)
|
|
But now < 1.83 clippy would complain about an unknown lint, so
allow that, too.
|
|
|
|
|
|
Previously only the last commit was linked.
Do not link numbers (technically also commits), and stop after
finding 12 commits on a line.
|
|
|
|
* Support {host} in hyperlinks
* Improve help text
|
|
Signed-off-by: dvermd <315743+dvermd@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
Redundant Option Checks, unwrap Safety, unnecessary Lifetimes, Rust often infers lifetimes automatically
---------
Co-authored-by: Quied <dexflame3@gmail.com>
|
|
* Center-align README content
As suggested by godelski
https://news.ycombinator.com/item?id=42092463
|
|
The output and exit code of run_app() are now testable, used for diff test.
|
|
|
|
|
|
|
|
Fixes #1098
|
|
|
|
Fixes #1878
|
|
|
|
Move blame to CallingProcess
Signed-off-by: dvermd <315743+dvermd@users.noreply.github.com>
|
|
Signed-off-by: dvermd <315743+dvermd@users.noreply.github.com>
|
|
|
|
|
|
|
|
v0.1.13 calculates the width of some characters differently, which
causes delta to panic
See unicode-rs/unicode-width#55 and unicode-rs/unicode-width#66
|
|
|
|
The fallback is already handled in `set_options`
|
|
|
|
|