nano

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

commit 74f128859b0e823a44f2a3e9565eb89b545f2166
parent 953fbf8efee3f9b4019d91389c72110da52dffc3
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Mon, 17 Apr 2017 11:51:48 +0200

tweaks: rename a constant, to match the corresponding option

Diffstat:
Msrc/global.c | 6+++---
Msrc/nano.c | 4++--
Msrc/nano.h | 2+-
Msrc/rcfile.c | 4++--
Msrc/text.c | 4++--
Msrc/winio.c | 2+-
6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -1176,7 +1176,7 @@ void shortcut_init(void) #ifndef NANO_TINY /* Group of "Appearance" toggles. */ add_to_sclist(MMAIN, "M-X", 0, do_toggle_void, NO_HELP); - add_to_sclist(MMAIN, "M-C", 0, do_toggle_void, CONST_UPDATE); + add_to_sclist(MMAIN, "M-C", 0, do_toggle_void, CONSTANT_SHOW); add_to_sclist(MMAIN, "M-O", 0, do_toggle_void, MORE_SPACE); add_to_sclist(MMAIN, "M-S", 0, do_toggle_void, SMOOTH_SCROLL); add_to_sclist(MMAIN, "M-$", 0, do_toggle_void, SOFTWRAP); @@ -1339,7 +1339,7 @@ const char *flagtostr(int flag) /* TRANSLATORS: The next seventeen strings are toggle descriptions; * they are best kept shorter than 40 characters, but may be longer. */ return N_("Help mode"); - case CONST_UPDATE: + case CONSTANT_SHOW: return N_("Constant cursor position display"); case MORE_SPACE: return N_("Use of one more line for editing"); @@ -1596,7 +1596,7 @@ sc *strtosc(const char *input) if (!strcasecmp(input, "nohelp")) s->toggle = NO_HELP; else if (!strcasecmp(input, "constupdate")) - s->toggle = CONST_UPDATE; + s->toggle = CONSTANT_SHOW; else if (!strcasecmp(input, "morespace")) s->toggle = MORE_SPACE; else if (!strcasecmp(input, "smoothscroll")) diff --git a/src/nano.c b/src/nano.c @@ -2141,7 +2141,7 @@ int main(int argc, char **argv) break; #endif case 'c': - SET(CONST_UPDATE); + SET(CONSTANT_SHOW); break; case 'd': SET(REBIND_DELETE); @@ -2660,7 +2660,7 @@ int main(int argc, char **argv) /* Update the displayed current cursor position only when there * are no keys waiting in the input buffer. */ - if (ISSET(CONST_UPDATE) && get_key_buffer_len() == 0) + if (ISSET(CONSTANT_SHOW) && get_key_buffer_len() == 0) do_cursorpos(FALSE); /* Refresh just the cursor position or the entire edit window. */ diff --git a/src/nano.h b/src/nano.h @@ -480,7 +480,7 @@ enum { DONTUSE, CASE_SENSITIVE, - CONST_UPDATE, + CONSTANT_SHOW, NO_HELP, SUSPEND, NO_WRAP, diff --git a/src/rcfile.c b/src/rcfile.c @@ -44,8 +44,8 @@ static const rcoption rcopts[] = { #ifndef DISABLE_JUSTIFY {"brackets", 0}, #endif - {"const", CONST_UPDATE}, /* deprecated form, remove in 2018 */ - {"constantshow", CONST_UPDATE}, + {"const", CONSTANT_SHOW}, /* deprecated form, remove in 2018 */ + {"constantshow", CONSTANT_SHOW}, #ifndef DISABLE_WRAPJUSTIFY {"fill", 0}, #endif diff --git a/src/text.c b/src/text.c @@ -2452,7 +2452,7 @@ void do_justify(bool full_justify) /* If needed, unset the cursor-position suppression flag, so the cursor * position /will/ be displayed upon a return to the main loop. */ - if (ISSET(CONST_UPDATE)) + if (ISSET(CONSTANT_SHOW)) do_cursorpos(FALSE); func = func_from_key(&kbinput); @@ -3566,7 +3566,7 @@ void do_verbatim_input(void) kbinput = get_verbatim_kbinput(edit, &kbinput_len); /* Unsuppress cursor-position display or blank the statusbar. */ - if (ISSET(CONST_UPDATE)) + if (ISSET(CONSTANT_SHOW)) do_cursorpos(FALSE); else { blank_statusbar(); diff --git a/src/winio.c b/src/winio.c @@ -1791,7 +1791,7 @@ void check_statusblank(void) statusblank--; /* When editing and 'constantshow' is active, skip the blanking. */ - if (currmenu == MMAIN && ISSET(CONST_UPDATE)) + if (currmenu == MMAIN && ISSET(CONSTANT_SHOW)) return; if (statusblank == 0) {