mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
5e8b0ac1e9
commit
fd0447f329
1 changed files with 5 additions and 4 deletions
|
|
@ -29,17 +29,18 @@ impl From<Cmd> for Opt {
|
|||
|
||||
impl Manager {
|
||||
pub fn rename(&mut self, opt: impl Into<Opt>) {
|
||||
let opt = opt.into() as Opt;
|
||||
if !self.active_mut().try_escape_visual() {
|
||||
return;
|
||||
} else if !opt.hovered && !self.active().selected.is_empty() {
|
||||
return self.bulk_rename();
|
||||
}
|
||||
|
||||
let Some(hovered) = self.hovered().map(|h| h.url()) else {
|
||||
return;
|
||||
};
|
||||
|
||||
let opt = opt.into() as Opt;
|
||||
if !opt.hovered && !self.active().selected.is_empty() {
|
||||
return self.bulk_rename();
|
||||
}
|
||||
|
||||
let name = Self::empty_url_part(&hovered, &opt.empty);
|
||||
let cursor = match opt.cursor.as_str() {
|
||||
"start" => Some(0),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue