mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat: new bulk_rename command always renames files with the editor (#2984)
Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
parent
bfe12c8052
commit
1f596a01fc
4 changed files with 7 additions and 9 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -1217,9 +1217,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "io-uring"
|
||||
version = "0.7.8"
|
||||
version = "0.7.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013"
|
||||
checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"cfg-if",
|
||||
|
|
@ -2155,9 +2155,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.14"
|
||||
version = "0.5.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de3a5d9f0aba1dbcec1cc47f0ff94a4b778fe55bca98a6dfa92e4e094e57b1c4"
|
||||
checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ impl Actor for Rename {
|
|||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
act!(mgr:escape_visual, cx)?;
|
||||
|
||||
if !opt.hovered && !cx.tab_mut().selected.is_empty() {
|
||||
if !opt.hovered && !cx.tab().selected.is_empty() {
|
||||
return act!(mgr:bulk_rename, cx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ impl App {
|
|||
succ!(self.core.tasks.plugin_micro(opt));
|
||||
}
|
||||
|
||||
match runtime_mut!(LUA) {
|
||||
Ok(mut r) => r.push(&opt.id),
|
||||
Err(e) => succ!(warn!("{e}")),
|
||||
}
|
||||
runtime_mut!(LUA)?.push(&opt.id);
|
||||
defer! { _ = runtime_mut!(LUA).map(|mut r| r.pop()) }
|
||||
|
||||
let plugin = match LOADER.load_with(&LUA, &opt.id, chunk) {
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ impl<'a> Executor<'a> {
|
|||
on!(linemode);
|
||||
on!(search);
|
||||
on!(search_do);
|
||||
on!(bulk_rename);
|
||||
|
||||
// Filter
|
||||
on!(filter);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue