nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit bd97ae7255cff7c6de6c85f4631e35df0ec46f98
parent 2ff398c68578bef389a27c9e429c2ee0e2b44d10
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 15 Jan 2018 13:15:23 +0100

tweaks: set a modifier in a single place, for conciseness

Diffstat:
Msrc/rcfile.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -591,7 +591,8 @@ short color_to_short(const char *colorname, bool *bright) if (strncasecmp(colorname, "bright", 6) == 0) { *bright = TRUE; colorname += 6; - } + } else + *bright = FALSE; if (strcasecmp(colorname, "green") == 0) return COLOR_GREEN; @@ -624,7 +625,7 @@ short color_to_short(const char *colorname, bool *bright) void parse_colors(char *ptr, int rex_flags) { short fg, bg; - bool bright = FALSE; + bool bright; char *item; if (!opensyntax) { @@ -779,8 +780,6 @@ colortype *parse_interface_color(char *combostr) { colortype *trio = nmalloc(sizeof(colortype)); - trio->bright = FALSE; - if (parse_color_names(combostr, &trio->fg, &trio->bg, &trio->bright)) { free(combostr); return trio;