Dan Davison
e7513937df
Update README
2021-10-26 20:10:18 -04:00
Thomas Otto
59e8908f82
Fix side-by-side mode without line numbers
...
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()
2021-10-26 18:05:30 -04:00
Thomas Otto
fbb654d437
Simplify incrementing of line numbers
2021-10-26 18:05:30 -04:00
Dan Davison
0745f853d4
Revert "Revert "Revert git blame handling ( #746 )""
...
This reverts commit 8886648374
.
2021-10-26 14:49:25 -04:00
FnControlOption
40c004a6cf
Update syntaxes and themes from bat v0.18.3
2021-10-26 13:27:31 -04:00
Dan Davison
e692804991
Ignore RUSTSEC-2020-0071
...
- Run audit when changing audit.toml
2021-10-26 12:04:29 -04:00
Dan Davison
8886648374
Revert "Revert git blame handling ( #746 )"
...
This reverts commit ec372683a1
.
This reverts commit ff25f2ba3b
.
2021-10-26 12:04:29 -04:00
Dan Davison
de8eebeab7
Ignore "RUSTSEC-2020-0159"
...
It appears to be inevitable at the moment due to the dependency chain
syntect -> plist -> chrono
See https://github.com/trishume/syntect/issues/385
2021-10-26 11:09:28 -04:00
Dan Davison
ff25f2ba3b
Remove chrono dependency
...
Should have been included in #746
2021-10-26 09:48:31 -04:00
Dan Davison
ec372683a1
Revert git blame handling ( #746 )
...
* 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
2021-10-26 09:46:45 -04:00
dependabot[bot]
a975f3dd82
Bump structopt from 0.3.23 to 0.3.25 ( #744 )
...
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.23 to 0.3.25.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.23...v0.3.25 )
---
updated-dependencies:
- dependency-name: structopt
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-25 19:30:47 -04:00
Dan Davison
5ff90b0d41
Document side-by-side line wrapping in README
2021-10-25 18:52:25 -04:00
Dan Davison
32f532ccff
Bump version for release
2021-10-25 18:44:50 -04:00
Thomas Otto
5762a527a7
Re-enable ANSI fill by equalizing panel sizes
...
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.
2021-10-25 18:29:43 -04:00
Thomas Otto
3e82c125cc
Remember if stdout is to an interactive terminal
...
Adapted `set_widths` because that's where there's
a Term instance already.
2021-10-25 18:29:43 -04:00
Thomas Otto
a8cd648929
Linenumber test helper added
2021-10-25 18:29:43 -04:00
Thomas Otto
d64532dc73
Wrap linenumber configs in MinusPlus or LeftRight
2021-10-25 18:29:43 -04:00
Thomas Otto
4f5e3ebbd1
Use fatal() to exit with errorcode 2 ( #739 )
...
* Fix two typos
* Dismantle two Pyramids of Doom
Use question mark operator instead
* Use fatal() to exit with errorcode 2
2021-10-18 11:15:58 -04:00
Thomas Otto
3a03d4b5ee
Convert Align and Placeholder into enums
...
Also move number and style logic out of `format_and_paint_line_numbers()`
and into a separate `linenumbers_and_styles()` function.
2021-10-18 10:41:12 -04:00
Thomas Otto
cd50d30184
Store line number prefix/suffix as SmolStr
2021-10-18 10:41:12 -04:00
Thomas Otto
07228cc408
Width can be an offset from the terminal width ( #727 )
...
No longer subtract 1 from the terminal width to accommodate e.g.
`less --status-columns`, instead set `--width -1` explicitly.
2021-10-18 09:37:19 -04:00
dependabot[bot]
7a2258b565
Bump xdg from 2.3.0 to 2.4.0 ( #737 )
...
Bumps [xdg](https://github.com/whitequark/rust-xdg ) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/whitequark/rust-xdg/releases )
- [Commits](https://github.com/whitequark/rust-xdg/compare/v2.3.0...v2.4.0 )
---
updated-dependencies:
- dependency-name: xdg
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-16 11:24:51 -04:00
dependabot[bot]
87a429da9c
Bump console from 0.14.1 to 0.15.0 ( #738 )
...
Bumps [console](https://github.com/mitsuhiko/console ) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/mitsuhiko/console/releases )
- [Changelog](https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/console/compare/0.14.1...v0.15.0 )
---
updated-dependencies:
- dependency-name: console
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-16 11:24:34 -04:00
Dan Davison
3a21f1b10b
Merge pull request #515 from th1000s/wrap
...
Add side-by-side line wrapping mode
2021-10-16 11:16:56 -04:00
Thomas Otto
a30271a09e
Change PlusMinus to the correct MinusPlus, add documentation
2021-10-16 14:07:30 +02:00
Thomas Otto
dbde169a28
Tests: store length of skipped header separately
2021-10-16 14:07:30 +02:00
Thomas Otto
1b238dbb8e
Fix clippy warning needless_option_as_deref
2021-10-16 14:07:30 +02:00
Dan Davison
32aef48ccf
Add inline-hint-style option and use for side-by-side wrap symbols
2021-10-16 14:07:30 +02:00
Dan Davison
7c93d279e6
Rename syntect module
2021-10-16 14:07:30 +02:00
Thomas Otto
dda6fdb457
Add side-by-side line wrapping
...
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.
2021-10-16 14:07:30 +02:00
Thomas Otto
ebd008c364
Add line number width calculation
2021-10-16 14:07:30 +02:00
Thomas Otto
464e9cab80
Left/Right converted into a simple typedef
2021-10-16 14:07:30 +02:00
Thomas Otto
f467f4cdd0
StructOpt without Default
...
This does not use the values provided by default_value, so
validation will fail.
2021-10-16 14:07:30 +02:00
Thomas Otto
636b56729b
Add fatal() function to handle exiting on errors
...
Panic when testing or exit with return value 2.
2021-10-16 14:07:28 +02:00
Dan Davison
85ba3ba578
Use bullet as default hunk marker in navigate mode
...
Ref 130b0b6a
#684
2021-10-13 09:57:06 -04:00
dependabot[bot]
b5f533b712
Bump xdg from 2.2.0 to 2.3.0 ( #734 )
...
Bumps [xdg](https://github.com/whitequark/rust-xdg ) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/whitequark/rust-xdg/releases )
- [Commits](https://github.com/whitequark/rust-xdg/compare/v2.2.0...v2.3.0 )
---
updated-dependencies:
- dependency-name: xdg
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-12 18:37:58 -04:00
dependabot[bot]
6048b31c3a
Bump ctrlc from 3.2.0 to 3.2.1 ( #733 )
...
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc ) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases )
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.2.0...3.2.1 )
---
updated-dependencies:
- dependency-name: ctrlc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-12 18:37:42 -04:00
dependabot[bot]
de57c6b476
Bump git2 from 0.13.22 to 0.13.23 ( #730 )
...
Bumps [git2](https://github.com/rust-lang/git2-rs ) from 0.13.22 to 0.13.23.
- [Release notes](https://github.com/rust-lang/git2-rs/releases )
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.22...0.13.23 )
---
updated-dependencies:
- dependency-name: git2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-12 18:37:27 -04:00
Dan Davison
d0c3fc52f8
Update diagnostics script
2021-09-30 18:45:15 -04:00
dependabot[bot]
02e34f20f8
Bump pathdiff from 0.2.0 to 0.2.1 ( #723 )
...
Bumps [pathdiff](https://github.com/Manishearth/pathdiff ) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/Manishearth/pathdiff/releases )
- [Commits](https://github.com/Manishearth/pathdiff/commits )
---
updated-dependencies:
- dependency-name: pathdiff
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-28 08:25:28 -04:00
Dan Davison
73270b62e1
Fix TOC characters
2021-09-27 16:30:25 -04:00
Dan Davison
b203d94f0d
README simplification
2021-09-27 16:26:57 -04:00
Thomas Otto
b9952f91cc
Option to set the background extension mode to ANSI or spaces
...
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.
2021-09-19 19:39:50 -04:00
Thomas Otto
db04d5e4ec
General PlusMinus data structure
...
Can be indexed with Minus/Plus or in a side-by-side context
with Left/Right to represent the left/right Panels.
2021-09-19 19:39:50 -04:00
dependabot[bot]
ceab1baa93
Bump unicode-width from 0.1.8 to 0.1.9 ( #719 )
2021-09-19 11:33:11 -04:00
Levi Bard
b49f9033cb
Remove superfluous lowercasing of feature names. ( #718 )
...
Fixes #716
2021-09-15 17:24:57 -04:00
Dan Davison
fff3c979cc
Display removed file name in file deletion case ( #717 )
2021-09-15 06:28:29 -04:00
dependabot[bot]
80691898cd
Bump git2 from 0.13.21 to 0.13.22 ( #712 )
...
Bumps [git2](https://github.com/rust-lang/git2-rs ) from 0.13.21 to 0.13.22.
- [Release notes](https://github.com/rust-lang/git2-rs/releases )
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.21...0.13.22 )
---
updated-dependencies:
- dependency-name: git2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-09 10:03:13 -04:00
Dan Davison
fb0d80992b
Fix interaction between navigate and (hunk-header-style without "line-number")
...
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
2021-09-02 18:35:15 -04:00
Dan Davison
7974d95501
Add failing test of navigate with (hunk-header-style without "line-number")
...
Ref #672
2021-09-02 18:35:15 -04:00