diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-30 22:15:35 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-30 22:15:35 -0400 |
commit | 70c8251b479e745edeb080058c1b95bf677684e1 (patch) | |
tree | a654e33e23fa6aa17ca8977807753209c312b39e /src/commands/new_directory.rs | |
parent | 5980d762dba38b003dbe54506cdd58ee85f97c8c (diff) |
move reloading of directory content into reload_dir.rs rather than tab.rs
Diffstat (limited to 'src/commands/new_directory.rs')
-rw-r--r-- | src/commands/new_directory.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/commands/new_directory.rs b/src/commands/new_directory.rs index b388aa7..859aff9 100644 --- a/src/commands/new_directory.rs +++ b/src/commands/new_directory.rs @@ -39,11 +39,15 @@ impl JoshutoRunnable for NewDirectory { Err(e) => return Err(JoshutoError::IO(e)), } } - match ReloadDirList::reload(context, view) { - Ok(_) => {} + let res = ReloadDirList::reload(context.curr_tab_index, context, view); + match res { + Ok(_) => { + let curr_tab = &mut context.tabs[context.curr_tab_index]; + curr_tab.refresh(view, &context.config_t); + ncurses::doupdate(); + } Err(e) => return Err(JoshutoError::IO(e)), } - ncurses::doupdate(); Ok(()) } } |