hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/todo.c
diff options
context:
space:
mode:
Diffstat (limited to 'todo.c')
-rw-r--r--todo.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/todo.c b/todo.c
index ae53e86..1f933f2 100644
--- a/todo.c
+++ b/todo.c
@@ -108,6 +108,7 @@ enum ThemeId
THEME_GRUVBOX,
THEME_NORD,
THEME_MONO,
+ THEME_LIGHT,
THEME_CUSTOM
};
@@ -164,6 +165,16 @@ static const struct Theme themes[] = {
.match = "\x1b[7m", .match_reset = "\x1b[27m",
.important = "\x1b[1m", .important_reset = "\x1b[22m",
},
+ [THEME_LIGHT] = {
+ .highlight = "\x1b[48;5;252m", .highlight_reset = "\x1b[49m",
+ .section = "\x1b[1;38;5;25m", .section_reset = "\x1b[22;39m",
+ .note = "\x1b[3;38;5;66m", .note_reset = "\x1b[23;39m",
+ .done = "\x1b[38;5;245m", .done_reset = "\x1b[39m",
+ .number = "\x1b[38;5;246m", .number_reset = "\x1b[39m",
+ .muted = "\x1b[38;5;244m", .muted_reset = "\x1b[39m",
+ .match = "\x1b[30;48;5;222m", .match_reset = "\x1b[39;49m",
+ .important = "\x1b[1;38;5;124m", .important_reset = "\x1b[22;39m",
+ },
[THEME_CUSTOM] = CUSTOM_THEME,
};
@@ -172,6 +183,7 @@ static const char* const theme_names[] = {
[THEME_GRUVBOX] = "gruvbox",
[THEME_NORD] = "nord",
[THEME_MONO] = "mono",
+ [THEME_LIGHT] = "light",
[THEME_CUSTOM] = "custom",
};
@@ -731,12 +743,14 @@ static void apply_prose(struct List* list, int skip)
for (int c = 0; c < len; c++)
{
- if (item->text[c] >= 'a' && item->text[c] <= 'z')
+ uint8_t ch = (uint8_t) item->text[c];
+
+ if (ch >= 'a' && ch <= 'z')
{
- item->text[c] = (char) (item->text[c] - 32);
+ item->text[c] = (char) (ch - 32);
break;
}
- if (item->text[c] >= 'A' && item->text[c] <= 'Z')
+ if ((ch >= 'A' && ch <= 'Z') || ch >= 0x80)
break;
}