2014-05-04 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (statusbar): Elide a variable.
+ * src/*: Rename the variable 'reverse_attr' to 'hilite_attribute',
+ and remove an unneeded call of wattroff().
2014-05-03 Benno Schulenberg <bensberg@justemail.net>
* src/*.h, src/*.c: Add the ability to colour four elements of
/* Start highlighting the currently selected file or
* directory. */
if (i == selected)
- wattron(edit, reverse_attr);
+ wattron(edit, hilite_attribute);
blank_line(edit, line, col, longest);
/* Finish highlighting the currently selected file or
* directory. */
if (i == selected)
- wattroff(edit, reverse_attr);
+ wattroff(edit, hilite_attribute);
free(foo);
interface_color_pair[i] = COLOR_PAIR(i + 1);
}
else if (i != FUNCTION_TAG)
- interface_color_pair[i] = reverse_attr;
+ interface_color_pair[i] = hilite_attribute;
if (specified_color_combo[i] != NULL) {
free(specified_color_combo[i]);
* maximum, used in regular expression searches. */
#endif
-int reverse_attr = A_REVERSE;
+int hilite_attribute = A_REVERSE;
/* The curses attribute we use for reverse video. */
#ifndef DISABLE_COLOR
char* specified_color_combo[] = {};
curs_set(0);
blank_edit();
- wattroff(bottomwin, reverse_attr);
blank_statusbar();
/* Set help_text as the string to display. */
/* If we're using bold text instead of reverse video text, set it up
* now. */
if (ISSET(BOLD_TEXT))
- reverse_attr = A_BOLD;
+ hilite_attribute = A_BOLD;
#ifndef NANO_TINY
/* Set up the search/replace history. */
#ifndef DISABLE_COLOR
set_colorpairs();
#else
- interface_color_pair[TITLE_BAR] = reverse_attr;
- interface_color_pair[STATUS_BAR] = reverse_attr;
- interface_color_pair[KEY_COMBO] = reverse_attr;
+ interface_color_pair[TITLE_BAR] = hilite_attribute;
+ interface_color_pair[STATUS_BAR] = hilite_attribute;
+ interface_color_pair[KEY_COMBO] = hilite_attribute;
interface_color_pair[FUNCTION_TAG] = A_NORMAL;
#endif
extern regmatch_t regmatches[10];
#endif
-extern int reverse_attr;
+extern int hilite_attribute;
#ifndef DISABLE_COLOR
extern char* specified_color_combo[NUMBER_OF_ELEMENTS];
#endif
if (paintlen > 0)
paintlen = actual_x(converted + index, paintlen);
- wattron(edit, reverse_attr);
+ wattron(edit, hilite_attribute);
mvwaddnstr(edit, line, x_start, converted + index,
paintlen);
- wattroff(edit, reverse_attr);
+ wattroff(edit, hilite_attribute);
}
}
#endif /* !NANO_TINY */
wnoutrefresh(edit);
if (highlight)
- wattron(edit, reverse_attr);
+ wattron(edit, hilite_attribute);
/* This is so we can show zero-length matches. */
if (word_len == 0)
waddch(edit, '$');
if (highlight)
- wattroff(edit, reverse_attr);
+ wattroff(edit, hilite_attribute);
}
#ifndef DISABLE_EXTRA