Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix underflow when indexing into `ColorScale`s
Marshall Bowers220228c183d7
diff --git a/crates/theme2/src/scale.rs b/crates/theme2/src/scale.rsindex a22036df8d5..c02f078c89f 100644--- a/crates/theme2/src/scale.rs+++ b/crates/theme2/src/scale.rs@@ -132,19 +132,19 @@ impl ColorScaleSet {}pub fn light(&self, step: ColorScaleStep) -> Hsla {- self.light[step - 1]+ self.light[step]}pub fn light_alpha(&self, step: ColorScaleStep) -> Hsla {- self.light_alpha[step - 1]+ self.light_alpha[step]}pub fn dark(&self, step: ColorScaleStep) -> Hsla {- self.dark[step - 1]+ self.dark[step]}pub fn dark_alpha(&self, step: ColorScaleStep) -> Hsla {- self.dark_alpha[step - 1]+ self.dark_alpha[step]}pub fn step(&self, cx: &AppContext, step: ColorScaleStep) -> Hsla {