Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
- Handle standard filepath:code and filepath:line_number:code output
as produced by `git grep`, `rg -H`, `grep -H`, etc (with -n for line
numbers).
- Retain the match highlighting as produced by the grep tool, and
expose it in delta's color output styled with grep-match-style.
(Note that --color=always is needed to retain the color if piping
into delta, but not for `git grep` when delta is configured as git's
pager)
- Special handling of -p, and -W options of `git grep`: these display
the function context in which the matches occur.
- `navigate` keybindings jump between match function contexts under
`git grep -p` and between matching lines under `git grep -W`.
Thanks @zachriggle for the proposal.
Fixes #769
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #426
Partial versions of these changes were previously in master and then
reverted multiple times.
See #746
0745f853d4bed52aca0b6739ac452d54ff54a153
3aab5d19569fa52ace2d7e6d196a1256990c4e20
|
|
|
|
|
|
Usecase: With delta used as a pager the command `git blame main.rs` calls
delta, but the piped data does not mention the filename. Instead try to
get the filename extension from the parent `git` process.
|
|
|
|
Simplifies line handling and printing by removing a "magical"
1-offset previously required in various locations.
Now explicitly prepend "" in `tokenize()`.
|
|
|
|
The struct's lifetime is not used outside new(), and most
of the methods used more like free functions, so uniformly
use 'a there. Also fix wrongly used lifetime for get_syntax().
|
|
Fixes #755
Ref #662
|
|
This should have been done in 0745f853d4bed52aca0b6739ac452d54ff54a153
and the command line options were therefore incorrectly released in
0.9.0.
|
|
Even though this feature enables line numbers, these can be disabled via
the git config `delta.line-numbers=false`. So always enable line numbers,
even if they do not print numbers.
Construct more structs with ..Self::default()
|
|
|
|
This reverts commit 8886648374e59cb27ff6dfd240a7b7207a617bfd.
|
|
This reverts commit ec372683a190427c0fc7b31646849da10996a940.
This reverts commit ff25f2ba3be40c0ddb2354c642a7ef453ad92d45.
|
|
* Security bug:
time-rs/time#293
https://rustsec.org/advisories/RUSTSEC-2020-0159.html
https://github.com/dandavison/delta/runs/4003260368?check_suite_focus=true
* No fix available in the chrono crate:
https://github.com/chronotope/chrono/issues/602
|
|
Make the two panels in side-by-side use the full terminal width by
inserting an extra space in the center between the panels if the
width is odd and ANSI filling is enabled.
Fall back to spaces when the output is not to a terminal.
|
|
Adapted `set_widths` because that's where there's
a Term instance already.
|
|
|
|
|
|
* Fix two typos
* Dismantle two Pyramids of Doom
Use question mark operator instead
* Use fatal() to exit with errorcode 2
|
|
Also move number and style logic out of `format_and_paint_line_numbers()`
and into a separate `linenumbers_and_styles()` function.
|
|
|
|
No longer subtract 1 from the terminal width to accommodate e.g.
`less --status-columns`, instead set `--width -1` explicitly.
|
|
|
|
|
|
|
|
|
|
|
|
If the current line does not fit into the panel, then
it is not truncated but split into multiple lines. A
wrapping symbol is placed at the end of the line. If
the new line is short enough, it is right-aligned.
Wrapping is limited to a certain number of lines
(--wrap-max-lines), if this is exceeded the line is
truncated by a now highlighted truncation symbol.
To disable wrapping set this value to 0.
|
|
|
|
|
|
This does not use the values provided by default_value, so
validation will fail.
|
|
Panic when testing or exit with return value 2.
|
|
Ref 130b0b6a #684
|
|
In side-by-side mode, if `background_color_extends_to_terminal_width`
is set, the left panel color is extended via spaces, but the right
one via an ANSI sequence which instructs the terminal emulator to
fill the background color rightwards.
The command line option --line-fill-method ansi|spaces can change
how the right panel background is filled.
Add enums `BgShouldFill` and `BgFillMethod` to better distinguish
if the background should be filled, and if so, how.
|
|
Can be indexed with Minus/Plus or in a side-by-side context
with Left/Right to represent the left/right Panels.
|
|
Fixes #716
|
|
|
|
Prior to this commit we were emitting a spurious colon when
hunk-header-style was set to a value such as "syntax" (i.e. not
including "line-number") and navigate was enabled.
Fixes #672
|