tweaks: rename a constant, to match the corresponding option

master
Benno Schulenberg 2017-04-17 11:51:48 +02:00
parent 953fbf8efe
commit 74f128859b
6 changed files with 11 additions and 11 deletions

View File

@ -1176,7 +1176,7 @@ void shortcut_init(void)
#ifndef NANO_TINY #ifndef NANO_TINY
/* Group of "Appearance" toggles. */ /* Group of "Appearance" toggles. */
add_to_sclist(MMAIN, "M-X", 0, do_toggle_void, NO_HELP); 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-O", 0, do_toggle_void, MORE_SPACE);
add_to_sclist(MMAIN, "M-S", 0, do_toggle_void, SMOOTH_SCROLL); add_to_sclist(MMAIN, "M-S", 0, do_toggle_void, SMOOTH_SCROLL);
add_to_sclist(MMAIN, "M-$", 0, do_toggle_void, SOFTWRAP); 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; /* TRANSLATORS: The next seventeen strings are toggle descriptions;
* they are best kept shorter than 40 characters, but may be longer. */ * they are best kept shorter than 40 characters, but may be longer. */
return N_("Help mode"); return N_("Help mode");
case CONST_UPDATE: case CONSTANT_SHOW:
return N_("Constant cursor position display"); return N_("Constant cursor position display");
case MORE_SPACE: case MORE_SPACE:
return N_("Use of one more line for editing"); return N_("Use of one more line for editing");
@ -1596,7 +1596,7 @@ sc *strtosc(const char *input)
if (!strcasecmp(input, "nohelp")) if (!strcasecmp(input, "nohelp"))
s->toggle = NO_HELP; s->toggle = NO_HELP;
else if (!strcasecmp(input, "constupdate")) else if (!strcasecmp(input, "constupdate"))
s->toggle = CONST_UPDATE; s->toggle = CONSTANT_SHOW;
else if (!strcasecmp(input, "morespace")) else if (!strcasecmp(input, "morespace"))
s->toggle = MORE_SPACE; s->toggle = MORE_SPACE;
else if (!strcasecmp(input, "smoothscroll")) else if (!strcasecmp(input, "smoothscroll"))

View File

@ -2141,7 +2141,7 @@ int main(int argc, char **argv)
break; break;
#endif #endif
case 'c': case 'c':
SET(CONST_UPDATE); SET(CONSTANT_SHOW);
break; break;
case 'd': case 'd':
SET(REBIND_DELETE); SET(REBIND_DELETE);
@ -2660,7 +2660,7 @@ int main(int argc, char **argv)
/* Update the displayed current cursor position only when there /* Update the displayed current cursor position only when there
* are no keys waiting in the input buffer. */ * 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); do_cursorpos(FALSE);
/* Refresh just the cursor position or the entire edit window. */ /* Refresh just the cursor position or the entire edit window. */

View File

@ -480,7 +480,7 @@ enum
{ {
DONTUSE, DONTUSE,
CASE_SENSITIVE, CASE_SENSITIVE,
CONST_UPDATE, CONSTANT_SHOW,
NO_HELP, NO_HELP,
SUSPEND, SUSPEND,
NO_WRAP, NO_WRAP,

View File

@ -44,8 +44,8 @@ static const rcoption rcopts[] = {
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
{"brackets", 0}, {"brackets", 0},
#endif #endif
{"const", CONST_UPDATE}, /* deprecated form, remove in 2018 */ {"const", CONSTANT_SHOW}, /* deprecated form, remove in 2018 */
{"constantshow", CONST_UPDATE}, {"constantshow", CONSTANT_SHOW},
#ifndef DISABLE_WRAPJUSTIFY #ifndef DISABLE_WRAPJUSTIFY
{"fill", 0}, {"fill", 0},
#endif #endif

View File

@ -2452,7 +2452,7 @@ void do_justify(bool full_justify)
/* If needed, unset the cursor-position suppression flag, so the cursor /* If needed, unset the cursor-position suppression flag, so the cursor
* position /will/ be displayed upon a return to the main loop. */ * position /will/ be displayed upon a return to the main loop. */
if (ISSET(CONST_UPDATE)) if (ISSET(CONSTANT_SHOW))
do_cursorpos(FALSE); do_cursorpos(FALSE);
func = func_from_key(&kbinput); func = func_from_key(&kbinput);
@ -3566,7 +3566,7 @@ void do_verbatim_input(void)
kbinput = get_verbatim_kbinput(edit, &kbinput_len); kbinput = get_verbatim_kbinput(edit, &kbinput_len);
/* Unsuppress cursor-position display or blank the statusbar. */ /* Unsuppress cursor-position display or blank the statusbar. */
if (ISSET(CONST_UPDATE)) if (ISSET(CONSTANT_SHOW))
do_cursorpos(FALSE); do_cursorpos(FALSE);
else { else {
blank_statusbar(); blank_statusbar();

View File

@ -1791,7 +1791,7 @@ void check_statusblank(void)
statusblank--; statusblank--;
/* When editing and 'constantshow' is active, skip the blanking. */ /* When editing and 'constantshow' is active, skip the blanking. */
if (currmenu == MMAIN && ISSET(CONST_UPDATE)) if (currmenu == MMAIN && ISSET(CONSTANT_SHOW))
return; return;
if (statusblank == 0) { if (statusblank == 0) {