Renaming a variable, and removing an unneeded call of wattroff().

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-05-04 08:53:06 +00:00
parent 0c3ced0d00
commit c970035001
8 changed files with 15 additions and 14 deletions

View File

@ -1,5 +1,7 @@
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

View File

@ -633,7 +633,7 @@ void browser_refresh(void)
/* 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);
@ -708,7 +708,7 @@ void browser_refresh(void)
/* Finish highlighting the currently selected file or
* directory. */
if (i == selected)
wattroff(edit, reverse_attr);
wattroff(edit, hilite_attribute);
free(foo);

View File

@ -59,7 +59,7 @@ void set_colorpairs(void)
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]);

View File

@ -203,7 +203,7 @@ regmatch_t regmatches[10];
* 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[] = {};

View File

@ -57,7 +57,6 @@ void do_help(void (*refresh_func)(void))
curs_set(0);
blank_edit();
wattroff(bottomwin, reverse_attr);
blank_statusbar();
/* Set help_text as the string to display. */

View File

@ -2513,7 +2513,7 @@ int main(int argc, char **argv)
/* 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. */
@ -2660,9 +2660,9 @@ int main(int argc, char **argv)
#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

View File

@ -130,7 +130,7 @@ extern regex_t search_regexp;
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

View File

@ -2820,10 +2820,10 @@ void edit_draw(filestruct *fileptr, const char *converted, int
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 */
@ -3383,7 +3383,7 @@ void do_replace_highlight(bool highlight, const char *word)
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)
@ -3395,7 +3395,7 @@ void do_replace_highlight(bool highlight, const char *word)
waddch(edit, '$');
if (highlight)
wattroff(edit, reverse_attr);
wattroff(edit, hilite_attribute);
}
#ifndef DISABLE_EXTRA