Skip to content

Commit

Permalink
Update to modalkit{,-ratatui}@0.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
ulyssa committed Aug 12, 2024
1 parent 04480ed commit 51b55ec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ edit = "0.1.4"
humansize = "2.0.0"

[dependencies.modalkit]
version = "0.0.19"
version = "0.0.20"
#git = "https://github.com/ulyssa/modalkit"
#rev = "cb8c8aeb9a499b9b16615ce144f9014d78036e01"
#rev = "24f3ec11c7f634005a27b26878d0fbbdcc08f272"

[dependencies.modalkit-ratatui]
version = "0.0.19"
version = "0.0.20"
#git = "https://github.com/ulyssa/modalkit"
#rev = "cb8c8aeb9a499b9b16615ce144f9014d78036e01"
#rev = "24f3ec11c7f634005a27b26878d0fbbdcc08f272"

[dependencies.matrix-sdk]
version = "0.7.1"
Expand Down
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ use modalkit::{

use modalkit_ratatui::{
cmdbar::CommandBarState,
screen::{Screen, ScreenState, TabLayoutDescription},
screen::{Screen, ScreenState, TabbedLayoutDescription},
windows::WindowLayoutDescription,
TerminalCursor,
TerminalExtOps,
Expand Down Expand Up @@ -187,7 +187,7 @@ fn setup_screen(
match settings.layout {
config::Layout::Restore => {
if let Ok(layout) = std::fs::read(&settings.layout_json) {
let tabs: TabLayoutDescription<IambInfo> =
let tabs: TabbedLayoutDescription<IambInfo> =
serde_json::from_slice(&layout).map_err(IambError::from)?;
let tabs = tabs.to_layout(area.into(), store)?;

Expand Down Expand Up @@ -242,7 +242,7 @@ struct Application {
focused: bool,

/// The tab layout before the last executed [TabAction].
last_layout: Option<TabLayoutDescription<IambInfo>>,
last_layout: Option<TabbedLayoutDescription<IambInfo>>,

/// Whether we need to do a full redraw (e.g., after running a subprocess).
dirty: bool,
Expand Down Expand Up @@ -479,7 +479,7 @@ impl Application {
None
},
Action::Command(act) => {
let acts = store.application.cmds.command(&act, &ctx)?;
let acts = store.application.cmds.command(&act, &ctx, &mut store.registers)?;
self.action_prepend(acts);

None
Expand Down
6 changes: 2 additions & 4 deletions src/windows/room/scrollback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,7 @@ impl EditorActions<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
let dir = ctx.get_search_regex_dir();
let dir = flip.resolve(&dir);

let lsearch = store.registers.get(&Register::LastSearch)?;
let lsearch = lsearch.value.to_string();
let lsearch = store.registers.get_last_search().to_string();
let needle = Regex::new(lsearch.as_ref())?;

let (mc, needs_load) = self.find_message(key, dir, &needle, count, info);
Expand Down Expand Up @@ -753,8 +752,7 @@ impl EditorActions<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
let dir = ctx.get_search_regex_dir();
let dir = flip.resolve(&dir);

let lsearch = store.registers.get(&Register::LastSearch)?;
let lsearch = lsearch.value.to_string();
let lsearch = store.registers.get_last_search().to_string();
let needle = Regex::new(lsearch.as_ref())?;

let (mc, needs_load) = self.find_message(key, dir, &needle, count, info);
Expand Down

0 comments on commit 51b55ec

Please sign in to comment.