nano

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

commit b9deb883fae414e4ae99ec9cf6b386e74f9bb9e1
parent 9c4ebed3ffb471e0ac3ca284c6595d2696b8e3f1
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri,  1 May 2020 13:25:15 +0200

tweaks: shorten the name of a symbol, to match its bindable function

Diffstat:
Msrc/color.c | 2+-
Msrc/global.c | 4++--
Msrc/help.c | 2+-
Msrc/nano.c | 4++--
Msrc/nano.h | 2+-
Msrc/rcfile.c | 2+-
Msrc/search.c | 2+-
Msrc/winio.c | 6+++---
8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/color.c b/src/color.c @@ -315,7 +315,7 @@ void precalc_multicolorinfo(void) regmatch_t startmatch, endmatch; linestruct *line, *tailline; - if (openfile->syntax == NULL || ISSET(NO_COLOR_SYNTAX)) + if (openfile->syntax == NULL || ISSET(NO_SYNTAX)) return; /* For each line, allocate cache space for the multiline-regex info. */ diff --git a/src/global.c b/src/global.c @@ -1329,7 +1329,7 @@ void shortcut_init(void) #endif add_to_sclist(MMAIN, "M-P", 0, do_toggle_void, WHITESPACE_DISPLAY); #ifdef ENABLE_COLOR - add_to_sclist(MMAIN, "M-Y", 0, do_toggle_void, NO_COLOR_SYNTAX); + add_to_sclist(MMAIN, "M-Y", 0, do_toggle_void, NO_SYNTAX); #endif /* Group of "Editing-behavior" toggles. */ @@ -1471,7 +1471,7 @@ const char *flagtostr(int flag) return N_("Soft wrapping of overlong lines"); case WHITESPACE_DISPLAY: return N_("Whitespace display"); - case NO_COLOR_SYNTAX: + case NO_SYNTAX: return N_("Color syntax highlighting"); case SMART_HOME: return N_("Smart home key"); diff --git a/src/help.c b/src/help.c @@ -553,7 +553,7 @@ void help_init(void) if (s->toggle && s->ordinal == counter) { ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus == MMAIN ? s->keystr : ""), _(flagtostr(s->toggle)), _("enable/disable")); - if (s->toggle == NO_COLOR_SYNTAX || s->toggle == TABS_TO_SPACES) + if (s->toggle == NO_SYNTAX || s->toggle == TABS_TO_SPACES) ptr += sprintf(ptr, "\n"); break; } diff --git a/src/nano.c b/src/nano.c @@ -1091,7 +1091,7 @@ void do_toggle(int flag) refresh_needed = TRUE; break; #ifdef ENABLE_COLOR - case NO_COLOR_SYNTAX: + case NO_SYNTAX: refresh_needed = TRUE; break; #endif @@ -1099,7 +1099,7 @@ void do_toggle(int flag) enabled = ISSET(flag); - if (flag == NO_HELP || flag == NO_COLOR_SYNTAX) + if (flag == NO_HELP || flag == NO_SYNTAX) enabled = !enabled; statusline(HUSH, "%s %s", _(flagtostr(flag)), diff --git a/src/nano.h b/src/nano.h @@ -512,7 +512,7 @@ enum NO_CONVERT, BACKUP_FILE, INSECURE_BACKUP, - NO_COLOR_SYNTAX, + NO_SYNTAX, PRESERVE, HISTORYLOG, RESTRICTED, diff --git a/src/rcfile.c b/src/rcfile.c @@ -455,7 +455,7 @@ keystruct *strtosc(const char *input) s->toggle = WHITESPACE_DISPLAY; #ifdef ENABLE_COLOR else if (!strcmp(input, "nosyntax")) - s->toggle = NO_COLOR_SYNTAX; + s->toggle = NO_SYNTAX; #endif else if (!strcmp(input, "smarthome")) s->toggle = SMART_HOME; diff --git a/src/search.c b/src/search.c @@ -646,7 +646,7 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only, #ifdef ENABLE_COLOR /* When doing syntax coloring, the replacement might require * a change of colors, so refresh the whole edit window. */ - if (openfile->syntax && !ISSET(NO_COLOR_SYNTAX)) + if (openfile->syntax && !ISSET(NO_SYNTAX)) edit_refresh(); else #endif diff --git a/src/winio.c b/src/winio.c @@ -2421,8 +2421,8 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col) #endif #ifdef ENABLE_COLOR - /* If color syntaxes are available and turned on, apply them. */ - if (openfile->syntax && !ISSET(NO_COLOR_SYNTAX)) { + /* If there are color rules (and coloring is turned on), apply them. */ + if (openfile->syntax && !ISSET(NO_SYNTAX)) { const colortype *varnish = openfile->syntax->color; /* If there are multiline regexes, make sure there is a cache. */ @@ -3259,7 +3259,7 @@ void edit_refresh(void) #ifdef ENABLE_COLOR /* When needed and useful, initialize the colors for the current syntax. */ - if (openfile->syntax && !have_palette && !ISSET(NO_COLOR_SYNTAX) && has_colors()) + if (openfile->syntax && !have_palette && !ISSET(NO_SYNTAX) && has_colors()) prepare_palette(); #endif