summaryrefslogtreecommitdiff
path: root/colors.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-03-03 19:17:48 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-03-03 19:17:48 -0500
commite3eb333ae2b07467e14dd9e2f845889f75f01a16 (patch)
tree64599a9b11f757a5e480c9f94b3ddedb57678d4e /colors.h
parent74cae07c859e68876ee98b99e1c1761d4c205484 (diff)
start autocomplete
Diffstat (limited to 'colors.h')
-rw-r--r--colors.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/colors.h b/colors.h
index e1f033c..f45ed01 100644
--- a/colors.h
+++ b/colors.h
@@ -6,6 +6,7 @@ ENUM_U16 {
COLOR_BG,
COLOR_HL,
COLOR_CURSOR,
+ COLOR_CURSOR_ERROR,
COLOR_CURSOR_LINE_BG,
COLOR_SELECTION_BG,
COLOR_VIEW_ONLY_CURSOR,
@@ -49,13 +50,14 @@ typedef struct {
char const *name;
} ColorName;
-static ColorName const color_names[COLOR_COUNT] = {
+static ColorName const color_names[] = {
{COLOR_UNKNOWN, "unknown"},
{COLOR_TEXT, "text"},
{COLOR_TEXT_SECONDARY, "text-secondary"},
{COLOR_BG, "bg"},
{COLOR_HL, "hl"},
{COLOR_CURSOR, "cursor"},
+ {COLOR_CURSOR_ERROR, "cursor-error"},
{COLOR_CURSOR_LINE_BG, "cursor-line-bg"},
{COLOR_VIEW_ONLY_CURSOR, "view-only-cursor"},
{COLOR_VIEW_ONLY_SELECTION_BG, "view-only-selection-bg"},
@@ -88,6 +90,8 @@ static ColorName const color_names[COLOR_COUNT] = {
{COLOR_LINE_NUMBERS_SEPARATOR, "line-numbers-separator"},
};
+static_assert_if_possible(arr_count(color_names) == COLOR_COUNT)
+
static ColorSetting color_setting_from_str(char const *str) {
// @OPTIMIZE: sort color_names, binary search
for (int i = 0; i < COLOR_COUNT; ++i) {