about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-26 21:48:31 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-26 21:48:31 -0800
commit7e86f6d123b11e83feb061f2c63670c8a1a69b0b (patch)
treead4ce014fb35204eb6fe0a3883587e3f822bb9d6 /src
parente2a53858a026af414c175d2ef78a169faca2509d (diff)
downloadteliva-7e86f6d123b11e83feb061f2c63670c8a1a69b0b.tar.gz
colorize comments in recent changes
Diffstat (limited to 'src')
-rw-r--r--src/lua.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua.c b/src/lua.c
index 904463f..f931266 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -593,14 +593,18 @@ void render_recent_changes (lua_State *L, int history_array, int start_index, in
       move(y, x);
       for (int j = 0; j < strlen(definition_contents); ++j) {
         char c = definition_contents[j];
+        if (c == '-' && j+1 < strlen(definition_contents) && definition_contents[j+1] == '-')
+          attron(FG(6));
         if (c != '\n') {
           addch(definition_contents[j]);
           ++x;
         }
         else {
+          /* newline */
           ++y;
           x = 1;
           move(y, x);
+          attroff(FG(6));
         }
       }
       y++;