pub trait HighlightingAssetsExt {
// Required method
fn get_theme_no_output(&self, theme_name: &str) -> &Theme;
}
Required Methods§
fn get_theme_no_output(&self, theme_name: &str) -> &Theme
Implementations on Foreign Types§
Source§impl HighlightingAssetsExt for HighlightingAssets
impl HighlightingAssetsExt for HighlightingAssets
Source§fn get_theme_no_output(&self, theme_name: &str) -> &Theme
fn get_theme_no_output(&self, theme_name: &str) -> &Theme
Get a theme by name. If the theme is not found, the default theme is returned.
This is an ugly hack to work around the fact that bat actually prints a warning to stderr when a theme is not found which might mess up the TUI. This function suppresses that warning by temporarily redirecting stderr and stdout.