]> git.refcnt.org Git - colorize.git/commitdiff
Add note in line printing function
authorSteven Schubiger <stsc@refcnt.org>
Mon, 13 May 2013 13:18:17 +0000 (15:18 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Mon, 13 May 2013 13:18:17 +0000 (15:18 +0200)
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)