diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-19 13:37:35 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-19 13:37:35 -0400 |
commit | 37f639a7b6a0f3a70d82bc7b3a09b1893bc4afcf (patch) | |
tree | 4722e1bf26718903fca0560246274de0ba601777 /src/commands/delete_files.rs | |
parent | 44252aa792dfae24a63cd727c1ff0bf032d8cf9f (diff) |
reimplement cut/copy/paste functionality
- now renames automatically if destionation exists
Diffstat (limited to 'src/commands/delete_files.rs')
-rw-r--r-- | src/commands/delete_files.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/delete_files.rs b/src/commands/delete_files.rs index 8f6cacb..071f629 100644 --- a/src/commands/delete_files.rs +++ b/src/commands/delete_files.rs @@ -1,7 +1,7 @@ use std::fs; use std::path; -use crate::commands::{self, JoshutoCommand, JoshutoRunnable}; +use crate::commands::{JoshutoCommand, JoshutoRunnable}; use crate::config::keymap; use crate::context::JoshutoContext; use crate::error::JoshutoError; @@ -55,7 +55,7 @@ impl JoshutoRunnable for DeleteFiles { let ch: i32 = ncurses::getch(); if ch == 'y' as i32 || ch == keymap::ENTER as i32 { if let Some(s) = context.tabs[context.curr_tab_index].curr_list.as_ref() { - if let Some(paths) = commands::collect_selected_paths(s) { + if let Some(paths) = s.get_selected_paths() { match Self::remove_files(paths) { Ok(_) => ui::wprint_msg(&view.bot_win, "Deleted files"), Err(e) => { |