summaryrefslogtreecommitdiffstats
path: root/src/commands/parent_directory.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-19 10:22:03 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-19 10:26:25 -0400
commitbd779fc6df4641f81bbbfe50663d883d64a5c88e (patch)
treee139f2d588f46142b2d632741a91339df66d1b8f /src/commands/parent_directory.rs
parent06b2d7730d10240b471e859c7988ed219aa4c590 (diff)
add soft-reload option
- this helps with reloading upon sort order change
Diffstat (limited to 'src/commands/parent_directory.rs')
-rw-r--r--src/commands/parent_directory.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/parent_directory.rs b/src/commands/parent_directory.rs
index 6f654e9..d6d05bd 100644
--- a/src/commands/parent_directory.rs
+++ b/src/commands/parent_directory.rs
@@ -1,4 +1,4 @@
-use crate::commands::{JoshutoCommand, JoshutoRunnable};
+use crate::commands::{JoshutoCommand, JoshutoRunnable, ReloadDirList};
use crate::context::JoshutoContext;
use crate::error::JoshutoResult;
use crate::ui::TuiBackend;
@@ -35,6 +35,7 @@ impl std::fmt::Display for ParentDirectory {
impl JoshutoRunnable for ParentDirectory {
fn execute(&self, context: &mut JoshutoContext, _: &mut TuiBackend) -> JoshutoResult<()> {
Self::parent_directory(context)?;
+ ReloadDirList::soft_reload(context.curr_tab_index, context)?;
Ok(())
}
}