Skip to content

Commit

Permalink
Revert "Fix error loading non-existant themes directory and use defau…
Browse files Browse the repository at this point in the history
…lt themes as the base when merging (#2411)" (#2562)

This reverts commit 48e75d0.
  • Loading branch information
jaeheonji committed Jun 18, 2023
1 parent 4102a14 commit a35bdb7
Showing 1 changed file with 7 additions and 12 deletions.
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

0 comments on commit a35bdb7

Please sign in to comment.