diff --git a/wezterm-gui/src/termwindow/background.rs b/wezterm-gui/src/termwindow/background.rs index a5ae2ab35..fe6f07403 100644 --- a/wezterm-gui/src/termwindow/background.rs +++ b/wezterm-gui/src/termwindow/background.rs @@ -266,11 +266,17 @@ fn load_background_layer( BackgroundSource::Gradient(g) => { let mut width = match layer.width { BackgroundSize::Dimension(d) => d.evaluate_as_pixels(h_context), - unsup => anyhow::bail!("{:?} not yet implemented", unsup), + unsup => anyhow::bail!( + "{unsup:?} is not implemented for background gradients. \ + Use e.g. `width = '100%'` instead" + ), } as u32; let mut height = match layer.height { BackgroundSize::Dimension(d) => d.evaluate_as_pixels(v_context), - unsup => anyhow::bail!("{:?} not yet implemented", unsup), + unsup => anyhow::bail!( + "{unsup:?} is not implemented for background gradients. \ + Use e.g. `height = '100%'` instead" + ), } as u32; if matches!(g.orientation, GradientOrientation::Radial { .. }) { @@ -292,11 +298,17 @@ fn load_background_layer( // It's not ideal. let width = match layer.width { BackgroundSize::Dimension(d) => d.evaluate_as_pixels(h_context), - unsup => anyhow::bail!("{:?} not yet implemented", unsup), + unsup => anyhow::bail!( + "{unsup:?} is not implemented for background color. \ + Use e.g. `width = '100%'` instead" + ), } as u32; let height = match layer.height { BackgroundSize::Dimension(d) => d.evaluate_as_pixels(v_context), - unsup => anyhow::bail!("{:?} not yet implemented", unsup), + unsup => anyhow::bail!( + "{unsup:?} is not implemented for background color. \ + Use e.g. `height = '100%'` instead" + ), } as u32; let size = width.min(height);