diff --git a/bin/commands/inbox/select.rs b/bin/commands/inbox/select.rs index 6f89e061..91422b64 100644 --- a/bin/commands/inbox/select.rs +++ b/bin/commands/inbox/select.rs @@ -5,6 +5,7 @@ use std::str::FromStr; use anyhow::Result; +use ratatui::Viewport; use termion::event::Key; use ratatui::layout::Constraint; @@ -293,7 +294,7 @@ impl App { .into() }); - tui::rm(channel, state, window).await + tui::rm(state, window, Viewport::Inline(20), channel).await } } diff --git a/bin/commands/issue/select.rs b/bin/commands/issue/select.rs index 6f7ca19a..6dd05cd2 100644 --- a/bin/commands/issue/select.rs +++ b/bin/commands/issue/select.rs @@ -6,6 +6,7 @@ use std::str::FromStr; use anyhow::{bail, Result}; +use ratatui::Viewport; use termion::event::Key; use ratatui::layout::Constraint; @@ -369,7 +370,7 @@ impl App { .into() }); - tui::rm(channel, state, window).await + tui::rm(state, window, Viewport::Inline(20), channel).await } } diff --git a/bin/commands/patch/select.rs b/bin/commands/patch/select.rs index 51073443..bc9db3ef 100644 --- a/bin/commands/patch/select.rs +++ b/bin/commands/patch/select.rs @@ -7,6 +7,7 @@ use std::str::FromStr; use anyhow::Result; +use ratatui::Viewport; use termion::event::Key; use radicle_tui as tui; @@ -22,8 +23,8 @@ use tui::ui::rm::widget::window::{ Page, PageProps, Shortcuts, ShortcutsProps, Window, WindowProps, }; use tui::ui::rm::widget::{ToWidget, Widget}; -use tui::ui::{span, BufferedValue}; use tui::ui::Column; +use tui::ui::{span, BufferedValue}; use tui::{BoxedAny, Channel, Exit, PageStack}; @@ -58,11 +59,13 @@ impl App { } pub async fn run(&self) -> Result> { + let viewport = Viewport::Inline(20); + if self.im { let channel = Channel::default(); let state = imui::App::try_from(&self.context)?; - tui::im(channel, state).await + tui::im(state, viewport, channel).await } else { let channel = Channel::default(); let tx = channel.tx.clone(); @@ -78,7 +81,7 @@ impl App { .into() }); - tui::rm(channel, state, window).await + tui::rm(state, window, viewport, channel).await } } }