From a9ccd99b905165eeee7c4e277a879ff4d0c2fb55 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 3 Mar 2021 09:39:49 +0100 Subject: [PATCH] tweaks: rename a symbol, to better match the corresponding option --- src/color.c | 2 +- src/definitions.h | 2 +- src/nano.c | 2 +- src/rcfile.c | 2 +- src/winio.c | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/color.c b/src/color.c index c7617169..a5718269 100644 --- a/src/color.c +++ b/src/color.c @@ -58,7 +58,7 @@ void set_interface_colorpairs(void) interface_color_pair[index] = A_NORMAL; else if (index == GUIDE_STRIPE) interface_color_pair[index] = A_REVERSE; - else if (index == HIGHLIGHTED) { + else if (index == SPOTLIGHTED) { init_pair(index + 1, COLOR_BLACK, COLOR_YELLOW + (COLORS > 15 ? 8 : 0)); interface_color_pair[index] = COLOR_PAIR(index + 1); } else if (index == PROMPT_BAR) diff --git a/src/definitions.h b/src/definitions.h index 7345620a..fe4403ef 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -282,7 +282,7 @@ enum { GUIDE_STRIPE, SCROLL_BAR, SELECTED_TEXT, - HIGHLIGHTED, + SPOTLIGHTED, PROMPT_BAR, STATUS_BAR, ERROR_MESSAGE, diff --git a/src/nano.c b/src/nano.c index f489a65f..9f725f34 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2325,7 +2325,7 @@ int main(int argc, char **argv) interface_color_pair[GUIDE_STRIPE] = A_REVERSE; interface_color_pair[SCROLL_BAR] = A_NORMAL; interface_color_pair[SELECTED_TEXT] = hilite_attribute; - interface_color_pair[HIGHLIGHTED] = A_REVERSE; + interface_color_pair[SPOTLIGHTED] = A_REVERSE; interface_color_pair[PROMPT_BAR] = hilite_attribute; interface_color_pair[STATUS_BAR] = hilite_attribute; interface_color_pair[ERROR_MESSAGE] = hilite_attribute; diff --git a/src/rcfile.c b/src/rcfile.c index d717e2ec..a311ebc0 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1559,7 +1559,7 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only) else if (strcmp(option, "selectedcolor") == 0) color_combo[SELECTED_TEXT] = parse_interface_color(argument); else if (strcmp(option, "spotlightcolor") == 0) - color_combo[HIGHLIGHTED] = parse_interface_color(argument); + color_combo[SPOTLIGHTED] = parse_interface_color(argument); else if (strcmp(option, "promptcolor") == 0) color_combo[PROMPT_BAR] = parse_interface_color(argument); else if (strcmp(option, "statuscolor") == 0) diff --git a/src/winio.c b/src/winio.c index 8f16e6b1..f7eaf1d0 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3504,11 +3504,11 @@ void spotlight(size_t from_col, size_t to_col) word = display_string(openfile->current->data, from_col, to_col - from_col, FALSE, overshoots); - wattron(edit, interface_color_pair[HIGHLIGHTED]); + wattron(edit, interface_color_pair[SPOTLIGHTED]); waddnstr(edit, word, actual_x(word, to_col)); if (overshoots) mvwaddch(edit, openfile->current_y, COLS - 1 - thebar, '>'); - wattroff(edit, interface_color_pair[HIGHLIGHTED]); + wattroff(edit, interface_color_pair[SPOTLIGHTED]); free(word); } @@ -3544,9 +3544,9 @@ void spotlight_softwrapped(size_t from_col, size_t to_col) word = display_string(openfile->current->data, from_col, break_col - from_col, FALSE, FALSE); - wattron(edit, interface_color_pair[HIGHLIGHTED]); + wattron(edit, interface_color_pair[SPOTLIGHTED]); waddnstr(edit, word, actual_x(word, break_col)); - wattroff(edit, interface_color_pair[HIGHLIGHTED]); + wattroff(edit, interface_color_pair[SPOTLIGHTED]); free(word);