Skip to content

Commit 52a231c

Browse files
committed
Update Ratatui
1 parent 16af981 commit 52a231c

File tree

4 files changed

+44
-24
lines changed

4 files changed

+44
-24
lines changed

Cargo.lock

Lines changed: 41 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ anyhow = "1.0.86"
5151
clap = { version = "4.5.14", features = ["derive"] }
5252
notify-debouncer-mini = { version = "0.4.1", default-features = false }
5353
os_pipe = "1.2.1"
54-
ratatui = { version = "0.27.0", default-features = false, features = ["crossterm"] }
54+
ratatui = { version = "0.28.0", default-features = false, features = ["crossterm"] }
5555
rustlings-macros = { path = "rustlings-macros", version = "=6.1.0" }
5656
serde_json = "1.0.122"
5757
serde.workspace = true

src/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn list(app_state: &mut AppState) -> Result<()> {
2727
let mut ui_state = UiState::new(app_state);
2828

2929
'outer: loop {
30-
terminal.draw(|frame| ui_state.draw(frame).unwrap())?;
30+
terminal.try_draw(|frame| ui_state.draw(frame).map_err(io::Error::other))?;
3131

3232
let key = loop {
3333
match event::read()? {

src/list/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<'a> UiState<'a> {
161161
}
162162

163163
pub fn draw(&mut self, frame: &mut Frame) -> Result<()> {
164-
let area = frame.size();
164+
let area = frame.area();
165165

166166
frame.render_stateful_widget(
167167
&self.table,

0 commit comments

Comments
 (0)