From 7fffc0a5d100685f2145c9666653fc03151b9a62 Mon Sep 17 00:00:00 2001 From: chtenb Date: Wed, 30 Aug 2023 09:38:29 +0200 Subject: [PATCH] Rename reset to default (#8114) Use `default` instead of `reset`, as this is the conventional name for ANSI codes 39/49. The word `reset` should be reserved for ANSI code `0`, which resets both fg and bg colors at once, while also removing all modifiers. While the code uses the value name `Reset`, this is misleading and should not leak into the user space. --- book/src/themes.md | 2 +- helix-view/src/theme.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book/src/themes.md b/book/src/themes.md index d1518de80..96d7c0eca 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -70,7 +70,7 @@ over it and is merged into the default palette. | Color Name | | --- | -| `reset` | +| `default` | | `black` | | `red` | | `green` | diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs index 7a9aae51e..a288ae9aa 100644 --- a/helix-view/src/theme.rs +++ b/helix-view/src/theme.rs @@ -359,7 +359,7 @@ impl Default for ThemePalette { fn default() -> Self { Self { palette: hashmap! { - "reset".to_string() => Color::Reset, + "default".to_string() => Color::Reset, "black".to_string() => Color::Black, "red".to_string() => Color::Red, "green".to_string() => Color::Green,