aboutsummaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/atuin-client/Cargo.toml7
-rw-r--r--crates/atuin-history/Cargo.toml2
-rw-r--r--crates/atuin/Cargo.toml6
-rw-r--r--crates/atuin/src/command/client/search/history_list.rs3
-rw-r--r--crates/atuin/src/command/client/search/inspector.rs2
-rw-r--r--crates/atuin/src/command/client/search/interactive.rs37
6 files changed, 27 insertions, 30 deletions
diff --git a/crates/atuin-client/Cargo.toml b/crates/atuin-client/Cargo.toml
index 02f18959..56d1e6d2 100644
--- a/crates/atuin-client/Cargo.toml
+++ b/crates/atuin-client/Cargo.toml
@@ -57,10 +57,7 @@ serde_with = "3.8.1"
# encryption
rusty_paseto = { version = "0.7.0", default-features = false }
-rusty_paserk = { version = "0.4.0", default-features = false, features = [
- "v4",
- "serde",
-] }
+rusty_paserk = { version = "0.4.0", default-features = false, features = ["v4", "serde"] }
# sync
urlencoding = { version = "2.1.0", optional = true }
@@ -71,7 +68,7 @@ indicatif = "0.17.7"
tiny-bip39 = "=1.0.0"
# theme
-crossterm = { version = "0.27.0", features = ["serde"] }
+crossterm = { version = "0.28.1", features = ["serde"] }
palette = { version = "0.7.5", features = ["serializing"] }
lazy_static = "1.4.0"
strum_macros = "0.26.3"
diff --git a/crates/atuin-history/Cargo.toml b/crates/atuin-history/Cargo.toml
index fc3fc88a..305323a8 100644
--- a/crates/atuin-history/Cargo.toml
+++ b/crates/atuin-history/Cargo.toml
@@ -24,7 +24,7 @@ directories = { workspace = true }
indicatif = "0.17.5"
serde = { workspace = true }
serde_json = { workspace = true }
-crossterm = { version = "0.27", features = ["use-dev-tty"] }
+crossterm = { version = "0.28.1", features = ["use-dev-tty"] }
unicode-width = "0.1"
itertools = { workspace = true }
tokio = { workspace = true }
diff --git a/crates/atuin/Cargo.toml b/crates/atuin/Cargo.toml
index ca9bfcd9..a43bf563 100644
--- a/crates/atuin/Cargo.toml
+++ b/crates/atuin/Cargo.toml
@@ -58,7 +58,7 @@ directories = { workspace = true }
indicatif = "0.17.5"
serde = { workspace = true }
serde_json = { workspace = true }
-crossterm = { version = "0.27", features = ["use-dev-tty"] }
+crossterm = { version = "0.28.1", features = ["use-dev-tty"] }
unicode-width = "0.1"
itertools = { workspace = true }
tokio = { workspace = true }
@@ -78,13 +78,13 @@ tiny-bip39 = "1"
futures-util = "0.3"
fuzzy-matcher = "0.3.7"
colored = "2.0.4"
-ratatui = "0.27"
+ratatui = "0.29.0"
tracing = "0.1"
tracing-subscriber = { workspace = true }
uuid = { workspace = true }
unicode-segmentation = "1.11.0"
sysinfo = "0.30.7"
-regex="1.10.5"
+regex = "1.10.5"
[target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies]
arboard = { version = "3.4", optional = true }
diff --git a/crates/atuin/src/command/client/search/history_list.rs b/crates/atuin/src/command/client/search/history_list.rs
index ace8234b..792e89b8 100644
--- a/crates/atuin/src/command/client/search/history_list.rs
+++ b/crates/atuin/src/command/client/search/history_list.rs
@@ -7,6 +7,7 @@ use atuin_client::{
use atuin_common::utils::Escapable as _;
use ratatui::{
buffer::Buffer,
+ crossterm::style,
layout::Rect,
style::{Modifier, Style},
widgets::{Block, StatefulWidget, Widget},
@@ -206,7 +207,7 @@ impl DrawState<'_> {
{
// if not applying alternative highlighting to the whole row, color the command
style = self.theme.as_style(Meaning::AlertError);
- style.attributes.set(crossterm::style::Attribute::Bold);
+ style.attributes.set(style::Attribute::Bold);
}
for section in h.command.escape_control().split_ascii_whitespace() {
diff --git a/crates/atuin/src/command/client/search/inspector.rs b/crates/atuin/src/command/client/search/inspector.rs
index 05a0fe21..718433c2 100644
--- a/crates/atuin/src/command/client/search/inspector.rs
+++ b/crates/atuin/src/command/client/search/inspector.rs
@@ -5,8 +5,8 @@ use atuin_client::{
history::{History, HistoryStats},
settings::Settings,
};
-use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
use ratatui::{
+ crossterm::event::{KeyCode, KeyEvent, KeyModifiers},
layout::Rect,
prelude::{Constraint, Direction, Layout},
style::Style,
diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs
index a2d32ee8..c1a678f0 100644
--- a/crates/atuin/src/command/client/search/interactive.rs
+++ b/crates/atuin/src/command/client/search/interactive.rs
@@ -4,15 +4,6 @@ use std::{
};
use atuin_common::utils::{self, Escapable as _};
-use crossterm::{
- cursor::SetCursorStyle,
- event::{
- self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode, KeyEvent, KeyModifiers,
- KeyboardEnhancementFlags, MouseEvent, PopKeyboardEnhancementFlags,
- PushKeyboardEnhancementFlags,
- },
- execute, terminal,
-};
use eyre::Result;
use futures_util::FutureExt;
use semver::Version;
@@ -38,6 +29,15 @@ use crate::{command::client::search::engines, VERSION};
use ratatui::{
backend::CrosstermBackend,
+ crossterm::{
+ cursor::SetCursorStyle,
+ event::{
+ self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode, KeyEvent, KeyModifiers,
+ KeyboardEnhancementFlags, MouseEvent, PopKeyboardEnhancementFlags,
+ PushKeyboardEnhancementFlags,
+ },
+ execute, terminal,
+ },
layout::{Alignment, Constraint, Direction, Layout},
prelude::*,
style::{Modifier, Style},
@@ -588,13 +588,13 @@ impl State {
theme: &Theme,
) {
let compact = match settings.style {
- atuin_client::settings::Style::Auto => f.size().height < 14,
+ atuin_client::settings::Style::Auto => f.area().height < 14,
atuin_client::settings::Style::Compact => true,
atuin_client::settings::Style::Full => false,
};
let invert = settings.invert;
let border_size = if compact { 0 } else { 1 };
- let preview_width = f.size().width - 2;
+ let preview_width = f.area().width - 2;
let preview_height = Self::calc_preview_height(
settings,
results,
@@ -604,12 +604,12 @@ impl State {
border_size,
preview_width,
);
- let show_help = settings.show_help && (!compact || f.size().height > 1);
+ let show_help = settings.show_help && (!compact || f.area().height > 1);
// This is an OR, as it seems more likely for someone to wish to override
// tabs unexpectedly being missed, than unexpectedly present.
let hide_extra = settings.auto_hide_height != 0
&& compact
- && f.size().height <= settings.auto_hide_height;
+ && f.area().height <= settings.auto_hide_height;
let show_tabs = settings.show_tabs && !hide_extra;
let chunks = Layout::default()
.direction(Direction::Vertical)
@@ -643,7 +643,7 @@ impl State {
}
.as_ref(),
)
- .split(f.size());
+ .split(f.area());
let input_chunk = if invert { chunks[0] } else { chunks[3] };
let results_list_chunk = if invert { chunks[1] } else { chunks[2] };
@@ -722,9 +722,8 @@ impl State {
let message = Paragraph::new("Nothing to inspect")
.block(
Block::new()
- .title(
- Title::from(" Info ".to_string()).alignment(Alignment::Center),
- )
+ .title(Title::from(" Info ".to_string()))
+ .title_alignment(Alignment::Center)
.borders(Borders::ALL)
.padding(Padding::vertical(2)),
)
@@ -774,11 +773,11 @@ impl State {
let extra_width = UnicodeWidthStr::width(self.search.input.substring());
let cursor_offset = if compact { 0 } else { 1 };
- f.set_cursor(
+ f.set_cursor_position((
// Put cursor past the end of the input text
input_chunk.x + extra_width as u16 + PREFIX_LENGTH + 1 + cursor_offset,
input_chunk.y + cursor_offset,
- );
+ ));
}
}