]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Add note in line printing function
[colorize.git] / colorize.c
index 078554a4025eebe1b7c851fb1796ee65538109fe..8514d4ecad95f52576813102ad54150d147e8b91 100644 (file)
@@ -785,6 +785,7 @@ print_line (const struct color **colors, bool bold, const char *const line, unsi
       print_clean (line);
     else
       {
+        /* Foreground color code is guaranteed to be set when background color code is present.  */
         if (colors[BACKGROUND] && colors[BACKGROUND]->code)
           printf ("\033[%s", colors[BACKGROUND]->code);
         if (colors[FOREGROUND]->code)