Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Use new pager for `rad diff`
cloudhead committed 2 years ago
commit 6dd52c94fb1472e251110e439fe656aaed74019f
parent 40f4383bbc94acbcadd06fce41e2960a6ffb9c33
3 files changed +3 -4
modified radicle-cli/src/commands/diff.rs
@@ -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(())
}
modified radicle-term/src/element.rs
@@ -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;

modified radicle-term/src/table.rs
@@ -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>,
{