nano

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

commit d7743b05f00d8bb8e12444ec39c7d00a105ac135
parent 8089f5ad54dd65fd50f68eba8b7a71e018bf1018
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 24 May 2020 12:26:24 +0200

tweaks: correct a comment, and drop a redundant (because nested) #ifdef

Also, drop an unneeded case-insensivity when comparing two strings,
as all commands in a nanorc file have to be in lower case.

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

diff --git a/src/rcfile.c b/src/rcfile.c @@ -1230,7 +1230,7 @@ void pick_up_name(const char *kind, char *ptr, char **storage) *storage = mallocstrcpy(*storage, ptr); } -/* Handle the four syntax-only commands. */ +/* Handle the six syntax-only commands. */ bool parse_syntax_commands(char *keyword, char *ptr) { if (strcmp(keyword, "color") == 0) @@ -1242,9 +1242,7 @@ bool parse_syntax_commands(char *keyword, char *ptr) pick_up_name("comment", ptr, &live_syntax->comment); #endif } else if (strcmp(keyword, "tabgives") == 0) { -#ifdef ENABLE_COLOR pick_up_name("tabgives", ptr, &live_syntax->tab); -#endif } else if (strcmp(keyword, "linter") == 0) pick_up_name("linter", ptr, &live_syntax->linter); else if (strcmp(keyword, "formatter") == 0) @@ -1410,7 +1408,7 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only) if (!opensyntax) jot_error(N_("A '%s' command requires a preceding " "'syntax' command"), keyword); - if (strcasestr("icolor", keyword)) + if (strstr("icolor", keyword)) seen_color_command = TRUE; continue; } else if (parse_syntax_commands(keyword, ptr))