summaryrefslogtreecommitdiffstats
path: root/src/tab.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-04-25 09:10:04 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-04-25 09:10:04 -0400
commit53f530a1ec26fce4664634f9c22fbb51b12c3f42 (patch)
tree4496ea4bc068145ce6ff62940f54921b0b3e4604 /src/tab.rs
parente411fc0be674ff01b614802a1e706071593c6647 (diff)
add option for enabling/disabling preview support
Diffstat (limited to 'src/tab.rs')
-rw-r--r--src/tab.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tab.rs b/src/tab.rs
index 65f4f89..268b9d2 100644
--- a/src/tab.rs
+++ b/src/tab.rs
@@ -71,7 +71,9 @@ impl JoshutoTab {
}
pub fn refresh_preview(&mut self, win: &JoshutoPanel, config_t: &config::JoshutoConfig) {
- preview::preview_entry(self, win, config_t);
+ if config_t.show_preview {
+ preview::preview_entry(self, win, config_t);
+ }
}
pub fn refresh_file_status(&self, win: &JoshutoPanel) {