diff options
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | doc/aerc-stylesets.7.scd | 2 | ||||
-rw-r--r-- | filters/colorize.c | 7 | ||||
-rw-r--r-- | filters/vectors/colorize-patch.expected | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0404164f..b293b869 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased](https://git.sr.ht/~rjarry/aerc/log/master) +### Added + +- Colorize can style diff chunk function names with `diff_chunk_func`. + ## [0.15.2](https://git.sr.ht/~rjarry/aerc/refs/0.15.2) - 2023-05-11 ### Fixed diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd index 218813fe..12aa97b6 100644 --- a/doc/aerc-stylesets.7.scd +++ b/doc/aerc-stylesets.7.scd @@ -151,6 +151,8 @@ declared under a *[viewer]* section of the styleset file. : Patch diff meta lines. | *diff_chunk* : Patch diff chunks. +| *diff_chunk_func* +: Patch diff chunk function names. | *diff_add* : Patch diff added lines. | *diff_del* diff --git a/filters/colorize.c b/filters/colorize.c index 1c979d11..6f988158 100644 --- a/filters/colorize.c +++ b/filters/colorize.c @@ -144,6 +144,7 @@ struct styles { struct style signature; struct style diff_meta; struct style diff_chunk; + struct style diff_chunk_func; struct style diff_add; struct style diff_del; struct style quote_1; @@ -160,7 +161,8 @@ static struct styles styles = { .header = { .bold = true, .fg = { .type = RGB, .rgb = 0xaf87ff } }, .signature = { .dim = true, .fg = { .type = RGB, .rgb = 0xaf87ff } }, .diff_meta = { .bold = true, .fg = { .type = RGB, .rgb = 0xffffff } }, - .diff_chunk = { .fg = { .type = RGB, .rgb = 0x00cdcd } }, + .diff_chunk = { .bold = true, .fg = { .type = RGB, .rgb = 0x00cdcd } }, + .diff_chunk_func = { .fg = { .type = RGB, .rgb = 0x00cdcd } }, .diff_add = { .fg = { .type = RGB, .rgb = 0x00cd00 } }, .diff_del = { .fg = { .type = RGB, .rgb = 0xcd0000 } }, .quote_1 = { .fg = { .type = RGB, .rgb = 0x5fafff } }, @@ -322,6 +324,7 @@ static struct {const char *n; struct style *s;} ini_objects[] = { {"signature", &styles.signature}, {"diff_meta", &styles.diff_meta}, {"diff_chunk", &styles.diff_chunk}, + {"diff_chunk_func", &styles.diff_chunk_func}, {"diff_add", &styles.diff_add}, {"diff_del", &styles.diff_del}, {"quote_1", &styles.quote_1}, @@ -441,7 +444,9 @@ static void diff_chunk(const char *in) len++; in += print_notabs(in, len); print(RESET); + print(seq(&styles.diff_chunk_func)); print_notabs(in, BUFSIZ); + print(RESET); } static inline bool isurichar(char c) diff --git a/filters/vectors/colorize-patch.expected b/filters/vectors/colorize-patch.expected index e9124672..733f7628 100644 --- a/filters/vectors/colorize-patch.expected +++ b/filters/vectors/colorize-patch.expected @@ -14,7 +14,7 @@ According to scdoc(5), numbered lists start with a period. [1;38;2;255;255;255mindex d82ba7cf8163..34bbf4af0fc5 100644[0m [1;38;2;255;255;255m--- a/doc/aerc-stylesets.7.scd[0m [1;38;2;255;255;255m+++ b/doc/aerc-stylesets.7.scd[0m -[38;2;0;205;205m@@ -180,20 +180,20 @@[0m that style applies, unless overridden by a higher layer. +[1;38;2;0;205;205m@@ -180,20 +180,20 @@[0m[38;2;0;205;205m that style applies, unless overridden by a higher layer.[0m The order that *msglist_\** styles are applied in is, from first to last: |