Mark today in bold iff "remind -c" color output is enabled.

This commit is contained in:
Dianne Skoll
2022-09-19 11:32:10 -04:00
parent 4ba7f5b1f2
commit 9e85b1932d
2 changed files with 7 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ CHANGES TO REMIND
remind and rem2ps executables. Use "make install-stripped" if you want
them stripped.
- CHANGE: remind: "remind -c" highlights today's date in bold, if
colors are enabled.
- DOCUMENTATION FIX: Document behavior of DO and filedir() with respect
to symbolic links.

View File

@@ -919,11 +919,11 @@ static void DoCalendarOneWeek(int nleft)
}
}
if (OrigJul+i == RealToday) {
if (isatty(STDOUT_FILENO)) {
if (UseVTColors) {
printf("\x1B[1m"); /* Bold */
}
PrintLeft(buf, ColSpaces-1, '*');
if (isatty(STDOUT_FILENO)) {
if (UseVTColors) {
printf("\x1B[0m"); /* Normal */
}
putchar(' ');
@@ -1141,11 +1141,11 @@ static int WriteCalendarRow(void)
}
}
if (Julian(y, m, d+i-wd) == RealToday) {
if (isatty(STDOUT_FILENO)) {
if (UseVTColors) {
printf("\x1B[1m"); /* Bold */
}
PrintLeft(buf, ColSpaces-1, '*');
if (isatty(STDOUT_FILENO)) {
if (UseVTColors) {
printf("\x1B[0m"); /* Normal */
}
putchar(' ');