diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-17 21:36:45 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-17 21:36:45 -0500 |
commit | e7bcdd1fc7685e1f132adc267e56cdae2925d632 (patch) | |
tree | 2f1a5352d67a788dfc90a9c966bd20379aa9d293 /src/tab.rs | |
parent | 686033bfcf6d34bfb180e0b0f64ae4493340bf38 (diff) |
reload_dir now reloads parent and child as well
Diffstat (limited to 'src/tab.rs')
-rw-r--r-- | src/tab.rs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -45,4 +45,14 @@ impl JoshutoTab { let parent = self.curr_path.parent()?; self.history.get_mut(parent) } + + pub fn child_list_mut(&mut self) -> Option<&mut JoshutoDirList> { + let path = { + let curr_list = self.curr_list_ref()?; + let index = curr_list.index?; + curr_list.contents[index].file_path().clone() + }; + + self.history.get_mut(path.as_path()) + } } |