diff --git a/src/winio.c b/src/winio.c index 4388ece..dc770cd 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2251,10 +2251,9 @@ void edit_draw(filestruct *fileptr, const char *converted, int /* Match position for start_regex. */ regmatch_t endmatch; /* Match position for end_regex. */ + int x = (varnish->bright) ? (x = A_BOLD) : (x = 0); - if (varnish->bright) - wattron(edit, A_BOLD); - wattron(edit, COLOR_PAIR(varnish->pairnum)); + wattron(edit, x | COLOR_PAIR(varnish->pairnum)); /* Two notes about regexec(). A return value of zero means * that there is a match. Also, rm_eo is the first * non-matching character after the match. */ @@ -2511,8 +2510,7 @@ void edit_draw(filestruct *fileptr, const char *converted, int } } tail_of_loop: - wattroff(edit, A_BOLD); - wattroff(edit, COLOR_PAIR(varnish->pairnum)); + wattroff(edit, x | COLOR_PAIR(varnish->pairnum)); } } #endif /* !DISABLE_COLOR */