on master help sign in
Merge remote-tracking branch 'origin/master' into fix-1063
552545fMartin Nordholts
CHANGELOG.md+1
@@ -10,6 +10,7 @@
10- Only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
10- Only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
11- Make ./tests/syntax-tests/regression_test.sh work on recent versions of macOS, see #1443 (@Enselic)
11- Make ./tests/syntax-tests/regression_test.sh work on recent versions of macOS, see #1443 (@Enselic)
12- VimL syntax highlighting fix, see #1450 (@esensar)
12- VimL syntax highlighting fix, see #1450 (@esensar)
13+- Print an 'Invalid syntax theme settings' error message if a custom theme is broken, see #614 (@Enselic)
13- Ignore PAGER=most with a warning to stderr, but allow override with BAT_PAGER or --config, see #1063 (@Enselic)
14- Ignore PAGER=most with a warning to stderr, but allow override with BAT_PAGER or --config, see #1063 (@Enselic)
14
15
15## Other
16## Other
src/assets.rs+10−3
@@ -38,9 +38,16 @@ impl HighlightingAssets {
38 };
38 };
39
39
40 let theme_dir = source_dir.join("themes");
40 let theme_dir = source_dir.join("themes");
41−
41+ if theme_dir.exists() {
42− let res = theme_set.add_from_folder(&theme_dir);
42+ let res = theme_set.add_from_folder(&theme_dir);
43− if res.is_err() {
43+ if let Err(err) = res {
44+ println!(
45+ "Failed to load one or more themes from '{}' (reason: '{}')",
46+ theme_dir.to_string_lossy(),
47+ err,
48+ );
49+ }
50+ } else {
44 println!(
51 println!(
45 "No themes were found in '{}', using the default set",
52 "No themes were found in '{}', using the default set",
46 theme_dir.to_string_lossy()
53 theme_dir.to_string_lossy()