summaryrefslogtreecommitdiffstats
path: root/src/app/tab.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/tab.rs')
-rw-r--r--src/app/tab.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/tab.rs b/src/app/tab.rs
index c6fe8af..87bd112 100644
--- a/src/app/tab.rs
+++ b/src/app/tab.rs
@@ -440,7 +440,11 @@ impl Tab {
/// Set the pathcontent to a new path.
/// Reset the window.
/// Add the last path to the history of visited paths.
+ /// Does nothing in preview or flagged display mode.
pub fn cd(&mut self, path: &path::Path) -> Result<()> {
+ if matches!(self.display_mode, Display::Preview | Display::Flagged) {
+ return Ok(());
+ }
match std::env::set_current_dir(path) {
Ok(()) => (),
Err(error) => {