mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat: allow repositioning the cursor in the rename DDS event (#2521)
This commit is contained in:
parent
1a2a18e333
commit
913a92d610
1 changed files with 3 additions and 2 deletions
|
|
@ -84,7 +84,6 @@ impl Mgr {
|
||||||
ok_or_not_found(fs::rename(p_new.join(&o), &new).await)?;
|
ok_or_not_found(fs::rename(p_new.join(&o), &new).await)?;
|
||||||
FilesOp::Deleting(p_new.clone(), HashSet::from_iter([UrnBuf::from(o)])).emit();
|
FilesOp::Deleting(p_new.clone(), HashSet::from_iter([UrnBuf::from(o)])).emit();
|
||||||
}
|
}
|
||||||
Pubsub::pub_from_rename(tab, &old, &new);
|
|
||||||
|
|
||||||
let file = File::from(new.clone()).await?;
|
let file = File::from(new.clone()).await?;
|
||||||
if p_new == p_old {
|
if p_new == p_old {
|
||||||
|
|
@ -94,7 +93,9 @@ impl Mgr {
|
||||||
FilesOp::Upserting(p_new, HashMap::from_iter([(n_new, file)])).emit();
|
FilesOp::Upserting(p_new, HashMap::from_iter([(n_new, file)])).emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(TabProxy::reveal(&new))
|
TabProxy::reveal(&new);
|
||||||
|
Pubsub::pub_from_rename(tab, &old, &new);
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn empty_url_part(url: &Url, by: &str) -> String {
|
fn empty_url_part(url: &Url, by: &str) -> String {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue