cli: Use new pager for `rad diff`
This commit is contained in:
parent
40f4383bbc
commit
6dd52c94fb
|
|
@ -8,7 +8,6 @@ use radicle_surf as surf;
|
|||
|
||||
use crate::git::pretty_diff::ToPretty as _;
|
||||
use crate::git::Rev;
|
||||
use crate::pager;
|
||||
use crate::terminal as term;
|
||||
use crate::terminal::args::{Args, Error, Help};
|
||||
use crate::terminal::highlight::Highlighter;
|
||||
|
|
@ -145,7 +144,7 @@ pub fn run(options: Options, _ctx: impl term::Context) -> anyhow::Result<()> {
|
|||
let mut hi = Highlighter::default();
|
||||
let pretty = diff.pretty(&mut hi, &(), &repo);
|
||||
|
||||
pager::run(pretty)?;
|
||||
term::pager::page(pretty)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ impl Constraint {
|
|||
}
|
||||
|
||||
/// A text element that has a size and can be rendered to the terminal.
|
||||
pub trait Element: fmt::Debug {
|
||||
pub trait Element: fmt::Debug + Send + Sync {
|
||||
/// Get the size of the element, in rows and columns.
|
||||
fn size(&self, parent: Constraint) -> Size;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ impl<const W: usize, T> Default for Table<W, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<const W: usize, T: Cell + fmt::Debug> Element for Table<W, T>
|
||||
impl<const W: usize, T: Cell + fmt::Debug + Send + Sync> Element for Table<W, T>
|
||||
where
|
||||
T::Padded: Into<Line>,
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue