summaryrefslogtreecommitdiffstats
path: root/src/commands/new_directory.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-02-10 22:09:58 -0500
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-02-11 09:33:06 -0500
commitdaf9d7b9afec8c598c0974c5d92263c3af5facf0 (patch)
tree5273968eb2b2ffc412ebe1894a96d13c9ae57d09 /src/commands/new_directory.rs
parentb09ecb650aa5805c7021ab76672dddc0a7b0bb52 (diff)
progress on switching to tui-rs for ui
Diffstat (limited to 'src/commands/new_directory.rs')
-rw-r--r--src/commands/new_directory.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/commands/new_directory.rs b/src/commands/new_directory.rs
index 3684b0a..2a72c38 100644
--- a/src/commands/new_directory.rs
+++ b/src/commands/new_directory.rs
@@ -3,7 +3,7 @@ use std::path;
use crate::commands::{JoshutoCommand, JoshutoRunnable, ReloadDirList};
use crate::context::JoshutoContext;
use crate::error::JoshutoResult;
-use crate::window::JoshutoView;
+use crate::ui::TuiBackend;
#[derive(Clone, Debug)]
pub struct NewDirectory {
@@ -28,14 +28,11 @@ impl std::fmt::Display for NewDirectory {
}
impl JoshutoRunnable for NewDirectory {
- fn execute(&self, context: &mut JoshutoContext, view: &JoshutoView) -> JoshutoResult<()> {
+ fn execute(&self, context: &mut JoshutoContext, backend: &mut TuiBackend) -> JoshutoResult<()> {
for path in &self.paths {
std::fs::create_dir_all(path)?;
}
ReloadDirList::reload(context.curr_tab_index, context)?;
- let curr_tab = &mut context.tabs[context.curr_tab_index];
- curr_tab.refresh(view, &context.config_t);
- ncurses::doupdate();
Ok(())
}
}