copying now targets current_dir instead of the current entry

This commit is contained in:
Mark 2023-08-28 01:13:16 +02:00
parent 9d839c8f42
commit 890dd9846b

View File

@ -727,11 +727,7 @@ impl TuiFile {
} }
// C -> Copy // C -> Copy
(Focus::Files, KeyCode::Char('c')) => { (Focus::Files, KeyCode::Char('c')) => {
if let Some(e) = self.dir_content.get(self.current_index) { return Ok(AppCmd::CopyTo(self.current_dir.clone()));
if let DirContentType::Dir { .. } = e.more {
return Ok(AppCmd::CopyTo(e.path.clone()));
}
}
} }
// R -> Remove // R -> Remove
(Focus::Files, KeyCode::Char('r')) => { (Focus::Files, KeyCode::Char('r')) => {