summaryrefslogtreecommitdiffstats
path: root/src/commands/change_directory.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-07-19 21:33:08 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-07-19 22:18:23 -0400
commit0b8747eb37d6d943d90e15ed82858d99d1800425 (patch)
tree6cb910dc37343000296c2951e0f67ff269ee3efd /src/commands/change_directory.rs
parent98e9665e59d7af0b2c002f0e6007578b3e90aa69 (diff)
changed how commands are handled
- arguments no longer go through wordexp (still working on a good alternative) other changes: - changed update_contents to reload_contents - opening files with mimetype entries are now moved from unix.rs to mimetypes.rs
Diffstat (limited to 'src/commands/change_directory.rs')
-rw-r--r--src/commands/change_directory.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/change_directory.rs b/src/commands/change_directory.rs
index c062c8f..3ec1946 100644
--- a/src/commands/change_directory.rs
+++ b/src/commands/change_directory.rs
@@ -32,13 +32,13 @@ impl ChangeDirectory {
.pop_or_create(&path, &context.config_t.sort_option)?;
std::mem::swap(&mut curr_tab.curr_list, &mut curr_list);
+
+ curr_tab.history.insert(curr_list.file_path().clone(), curr_list);
curr_tab.curr_path = path.clone();
- if let Some(s) = path.parent() {
- curr_tab
- .history
- .populate_to_root(s, &context.config_t.sort_option)?;
- }
+ curr_tab
+ .history
+ .populate_to_root(path, &context.config_t.sort_option)?;
curr_tab.refresh(view, &context.config_t);
Ok(())