summaryrefslogtreecommitdiffstats
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/mod.rs1
-rw-r--r--src/commands/tab_bar_mode.rs9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index 5489a1c..0f821bd 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -30,6 +30,7 @@ pub mod show_tasks;
pub mod sort;
pub mod sub_process;
pub mod subdir_fzf;
+pub mod tab_bar_mode;
pub mod tab_ops;
pub mod touch_file;
pub mod uimodes;
diff --git a/src/commands/tab_bar_mode.rs b/src/commands/tab_bar_mode.rs
new file mode 100644
index 0000000..839ab49
--- /dev/null
+++ b/src/commands/tab_bar_mode.rs
@@ -0,0 +1,9 @@
+use crate::{config::option::TabBarDisplayMode, context::AppContext, error::JoshutoError};
+
+pub fn set_tab_bar_display_mode(
+ context: &mut AppContext,
+ mode: &TabBarDisplayMode,
+) -> Result<(), JoshutoError> {
+ context.tab_context_mut().display.mode = *mode;
+ Ok(())
+}