diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-25 07:49:55 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-25 07:49:55 -0400 |
commit | e0c3777930f87691eb8ade05c81764f9b2ae15b4 (patch) | |
tree | 64d762edd61e225e1c1f11a403fc961eedcde631 /src/commands/open_file.rs | |
parent | 2be79f4cd0ee0e89c5cadf5121a8b979391d0d51 (diff) |
refactor previewing
- remove dependency on preview.rs in commands/
- now can just call tab.refresh_preview to update the preview
Diffstat (limited to 'src/commands/open_file.rs')
-rw-r--r-- | src/commands/open_file.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs index 70c2a20..bac4cdd 100644 --- a/src/commands/open_file.rs +++ b/src/commands/open_file.rs @@ -5,7 +5,6 @@ use crate::config::mimetype; use crate::context::JoshutoContext; use crate::error::JoshutoError; use crate::history::DirectoryHistory; -use crate::preview; use crate::textfield::JoshutoTextField; use crate::ui; use crate::unix; @@ -77,7 +76,6 @@ impl OpenFile { &context.username, &context.hostname, ); - preview::preview_file(curr_tab, view, &context.config_t); } else { let paths: Option<Vec<PathBuf>> = context.tabs[context.curr_tab_index] .curr_list @@ -101,7 +99,6 @@ impl OpenFile { &context.username, &context.hostname, ); - preview::preview_file(curr_tab, view, &context.config_t); } ncurses::doupdate(); Ok(()) |