Fix for breaking change in ratatui 0.24.0 (#1352)
This commit is contained in:
parent
fa7caf430a
commit
2066778780
3 changed files with 15 additions and 5 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
@ -1691,6 +1691,15 @@ dependencies = [
|
||||||
"logos-codegen",
|
"logos-codegen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lru"
|
||||||
|
version = "0.12.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1efa59af2ddfad1854ae27d75009d538d0998b4b2fd47083e743ac1a10e46c60"
|
||||||
|
dependencies = [
|
||||||
|
"hashbrown 0.14.2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "malloc_buf"
|
name = "malloc_buf"
|
||||||
version = "0.0.6"
|
version = "0.0.6"
|
||||||
|
@ -2289,15 +2298,16 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ratatui"
|
name = "ratatui"
|
||||||
version = "0.23.0"
|
version = "0.24.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2e2e4cd95294a85c3b4446e63ef054eea43e0205b1fd60120c16b74ff7ff96ad"
|
checksum = "0ebc917cfb527a566c37ecb94c7e3fd098353516fb4eb6bea17015ade0182425"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.4.1",
|
"bitflags 2.4.1",
|
||||||
"cassowary",
|
"cassowary",
|
||||||
"crossterm",
|
"crossterm",
|
||||||
"indoc",
|
"indoc",
|
||||||
"itertools",
|
"itertools",
|
||||||
|
"lru",
|
||||||
"paste",
|
"paste",
|
||||||
"strum",
|
"strum",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
|
|
|
@ -70,7 +70,7 @@ tiny-bip39 = "1"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
fuzzy-matcher = "0.3.7"
|
fuzzy-matcher = "0.3.7"
|
||||||
colored = "2.0.4"
|
colored = "2.0.4"
|
||||||
ratatui = "0.23"
|
ratatui = "0.24"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
cli-clipboard = "0.4.0"
|
cli-clipboard = "0.4.0"
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ use super::{
|
||||||
};
|
};
|
||||||
use crate::{command::client::search::engines, VERSION};
|
use crate::{command::client::search::engines, VERSION};
|
||||||
use ratatui::{
|
use ratatui::{
|
||||||
backend::{Backend, CrosstermBackend},
|
backend::CrosstermBackend,
|
||||||
layout::{Alignment, Constraint, Direction, Layout},
|
layout::{Alignment, Constraint, Direction, Layout},
|
||||||
style::{Color, Modifier, Style},
|
style::{Color, Modifier, Style},
|
||||||
text::{Line, Span, Text},
|
text::{Line, Span, Text},
|
||||||
|
@ -312,7 +312,7 @@ impl State {
|
||||||
|
|
||||||
#[allow(clippy::cast_possible_truncation)]
|
#[allow(clippy::cast_possible_truncation)]
|
||||||
#[allow(clippy::bool_to_int_with_if)]
|
#[allow(clippy::bool_to_int_with_if)]
|
||||||
fn draw<T: Backend>(&mut self, f: &mut Frame<'_, T>, results: &[History], settings: &Settings) {
|
fn draw(&mut self, f: &mut Frame, results: &[History], settings: &Settings) {
|
||||||
let compact = match settings.style {
|
let compact = match settings.style {
|
||||||
atuin_client::settings::Style::Auto => f.size().height < 14,
|
atuin_client::settings::Style::Auto => f.size().height < 14,
|
||||||
atuin_client::settings::Style::Compact => true,
|
atuin_client::settings::Style::Compact => true,
|
||||||
|
|
Loading…
Reference in a new issue