Create new file with <N>

This commit is contained in:
ChristianVisintin
2020-12-26 10:16:01 +01:00
parent f6d1f24b60
commit 644ea1566c
4 changed files with 114 additions and 2 deletions

View File

@@ -228,6 +228,13 @@ impl FileTransferActivity {
let pwd: PathBuf = self.local.wrkdir.clone();
self.local_scan(pwd.as_path());
}
'n' | 'N' => {
// New file
self.input_mode = InputMode::Popup(PopupType::Input(
String::from("New file"),
Self::callback_new_file,
));
}
'o' | 'O' => {
// Edit local file
if self.local.files.get(self.local.index).is_some() {
@@ -446,6 +453,13 @@ impl FileTransferActivity {
// Reload file entries
self.reload_remote_dir();
}
'n' | 'N' => {
// New file
self.input_mode = InputMode::Popup(PopupType::Input(
String::from("New file"),
Self::callback_new_file,
));
}
'o' | 'O' => {
// Edit remote file
if self.remote.files.get(self.remote.index).is_some() {