mirror of
https://github.com/sharkdp/bat
synced 2026-06-09 10:03:18 +00:00
Merge branch 'master' into fix/i686-deb-architecture
This commit is contained in:
+3
-3
@@ -1,7 +1,5 @@
|
||||
# unreleased
|
||||
|
||||
- Fixed bug caused by using `--plain` and `--terminal-width=N` flags simultaneously, see #3529 (@H4k1l)
|
||||
- Fixed syntax tests path, see #3610 (@foxfromworld)
|
||||
|
||||
## Features
|
||||
|
||||
@@ -28,11 +26,13 @@
|
||||
- `--help` now correctly honors `--pager=builtin`. See #3516 (@keith-hall)
|
||||
- `--help` now correctly honors custom themes. See #3524 (@keith-hall)
|
||||
- Fixed test compatibility with future Cargo build directory changes, see #3550 (@nmacl)
|
||||
- Fixed bug caused by using `--plain` and `--terminal-width=N` flags simultaneously, see #3529 (@H4k1l)
|
||||
- Fixed syntax tests path, see #3610 (@foxfromworld)
|
||||
|
||||
## Other
|
||||
- Use git version of cross. See #3533 (@OctopusET)
|
||||
|
||||
- Bump MSRV to 1.88, update `time` crate to 0.3.47 to fix RUSTSEC-2026-0009, see #3581 (@NORMAL-EX)
|
||||
- Allow home and end keys to be used with builtin pager, see #3651 (@keith-hall)
|
||||
|
||||
## Syntaxes
|
||||
|
||||
|
||||
@@ -23,6 +23,18 @@ pub struct BuiltinPager {
|
||||
impl BuiltinPager {
|
||||
fn new() -> Self {
|
||||
let pager = minus::Pager::new();
|
||||
|
||||
let mut input_register = minus::input::HashedEventRegister::default();
|
||||
input_register.add_key_events(&["home"], |_, _| {
|
||||
minus::input::InputEvent::UpdateUpperMark(0)
|
||||
});
|
||||
input_register.add_key_events(&["end"], |_, _| {
|
||||
minus::input::InputEvent::UpdateUpperMark(usize::MAX)
|
||||
});
|
||||
pager
|
||||
.set_input_classifier(Box::new(input_register))
|
||||
.expect("failed to set input classifier on newly created pager");
|
||||
|
||||
let handle = {
|
||||
let pager = pager.clone();
|
||||
Some(spawn(move || {
|
||||
|
||||
Reference in New Issue
Block a user