Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: theme issue in v0.37.0 #2562

Merged
merged 1 commit into from
Jun 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 7 additions & 12 deletions zellij-utils/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,13 @@ impl Setup {
None => config.options.clone(),
};

config.themes = get_default_themes().merge(config.themes);

if let Some(Command::Setup(Setup { clean: false, .. })) = &cli_args.command {
let user_theme_dir = config_options.theme_dir.clone().or_else(|| {
get_theme_dir(cli_args.config_dir.clone().or_else(find_default_config_dir))
// If theme dir is not explicitly specified in config_options,
// only try to use it if it exists.
.filter(|dir| dir.exists())
});
if let Some(user_theme_dir) = user_theme_dir {
config.themes = config.themes.merge(Themes::from_dir(user_theme_dir)?);
}
config.themes = config.themes.merge(get_default_themes());

let user_theme_dir = config_options.theme_dir.clone().or_else(|| {
get_theme_dir(cli_args.config_dir.clone().or_else(find_default_config_dir))
});
if let Some(user_theme_dir) = user_theme_dir {
config.themes = config.themes.merge(Themes::from_dir(user_theme_dir)?);
}

if let Some(Command::Setup(ref setup)) = &cli_args.command {
Expand Down