Skip to content

Commit 136418f

Browse files
committed
chore: return Err when terminal size is insufficient
1 parent 8d047fa commit 136418f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

promkit/src/terminal.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ impl Terminal {
6161
.collect::<Vec<&Pane>>();
6262

6363
if height < viewable_panes.len() as u16 {
64-
return crossterm::execute!(
65-
io::stdout(),
66-
terminal::Clear(terminal::ClearType::FromCursorDown),
67-
style::Print("⚠️ Insufficient Space"),
68-
)
69-
.map_err(anyhow::Error::from);
64+
return Err(anyhow::anyhow!("Insufficient space to display all panes"));
7065
}
7166

7267
crossterm::queue!(

0 commit comments

Comments
 (0)