options: allow -U (--quickblank) to be used in the tiny version
It takes almost no code and is a useful little improvement over Pico.master
parent
3c875f9b59
commit
1fbe7596f8
|
@ -836,9 +836,7 @@ void usage(void)
|
||||||
#endif
|
#endif
|
||||||
print_opt(_("-T <#cols>"), _("--tabsize=<#cols>"),
|
print_opt(_("-T <#cols>"), _("--tabsize=<#cols>"),
|
||||||
N_("Set width of a tab to #cols columns"));
|
N_("Set width of a tab to #cols columns"));
|
||||||
#ifndef NANO_TINY
|
|
||||||
print_opt("-U", "--quickblank", N_("Do quick statusbar blanking"));
|
print_opt("-U", "--quickblank", N_("Do quick statusbar blanking"));
|
||||||
#endif
|
|
||||||
print_opt("-V", "--version", N_("Print version information and exit"));
|
print_opt("-V", "--version", N_("Print version information and exit"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print_opt("-W", "--wordbounds",
|
print_opt("-W", "--wordbounds",
|
||||||
|
@ -1935,6 +1933,7 @@ int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
{"restricted", 0, NULL, 'R'},
|
{"restricted", 0, NULL, 'R'},
|
||||||
{"tabsize", 1, NULL, 'T'},
|
{"tabsize", 1, NULL, 'T'},
|
||||||
|
{"quickblank", 0, NULL, 'U'},
|
||||||
{"version", 0, NULL, 'V'},
|
{"version", 0, NULL, 'V'},
|
||||||
#ifndef DISABLE_COLOR
|
#ifndef DISABLE_COLOR
|
||||||
{"syntax", 1, NULL, 'Y'},
|
{"syntax", 1, NULL, 'Y'},
|
||||||
|
@ -1981,7 +1980,6 @@ int main(int argc, char **argv)
|
||||||
{"poslog", 0, NULL, 'P'}, /* deprecated form, remove in 2018 */
|
{"poslog", 0, NULL, 'P'}, /* deprecated form, remove in 2018 */
|
||||||
{"positionlog", 0, NULL, 'P'},
|
{"positionlog", 0, NULL, 'P'},
|
||||||
{"smooth", 0, NULL, 'S'},
|
{"smooth", 0, NULL, 'S'},
|
||||||
{"quickblank", 0, NULL, 'U'},
|
|
||||||
{"wordbounds", 0, NULL, 'W'},
|
{"wordbounds", 0, NULL, 'W'},
|
||||||
{"wordchars", 1, NULL, 'X'},
|
{"wordchars", 1, NULL, 'X'},
|
||||||
{"autoindent", 0, NULL, 'i'},
|
{"autoindent", 0, NULL, 'i'},
|
||||||
|
@ -2119,11 +2117,9 @@ int main(int argc, char **argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifndef NANO_TINY
|
|
||||||
case 'U':
|
case 'U':
|
||||||
SET(QUICK_BLANK);
|
SET(QUICK_BLANK);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case 'V':
|
case 'V':
|
||||||
version();
|
version();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
@ -77,6 +77,7 @@ static const rcoption rcopts[] = {
|
||||||
{"punct", 0},
|
{"punct", 0},
|
||||||
{"quotestr", 0},
|
{"quotestr", 0},
|
||||||
#endif
|
#endif
|
||||||
|
{"quickblank", QUICK_BLANK},
|
||||||
{"rebinddelete", REBIND_DELETE},
|
{"rebinddelete", REBIND_DELETE},
|
||||||
{"rebindkeypad", REBIND_KEYPAD},
|
{"rebindkeypad", REBIND_KEYPAD},
|
||||||
{"regexp", USE_REGEXP},
|
{"regexp", USE_REGEXP},
|
||||||
|
@ -99,7 +100,6 @@ static const rcoption rcopts[] = {
|
||||||
{"locking", LOCKING},
|
{"locking", LOCKING},
|
||||||
{"matchbrackets", 0},
|
{"matchbrackets", 0},
|
||||||
{"noconvert", NO_CONVERT},
|
{"noconvert", NO_CONVERT},
|
||||||
{"quickblank", QUICK_BLANK},
|
|
||||||
{"quiet", QUIET},
|
{"quiet", QUIET},
|
||||||
{"showcursor", SHOW_CURSOR},
|
{"showcursor", SHOW_CURSOR},
|
||||||
{"smarthome", SMART_HOME},
|
{"smarthome", SMART_HOME},
|
||||||
|
|
|
@ -2178,13 +2178,13 @@ void statusline(message_type importance, const char *msg, ...)
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (old_whitespace)
|
if (old_whitespace)
|
||||||
SET(WHITESPACE_DISPLAY);
|
SET(WHITESPACE_DISPLAY);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If doing quick blanking, blank the statusbar after just one keystroke.
|
/* If doing quick blanking, blank the statusbar after just one keystroke.
|
||||||
* Otherwise, blank it after twenty-six keystrokes, as Pico does. */
|
* Otherwise, blank it after twenty-six keystrokes, as Pico does. */
|
||||||
if (ISSET(QUICK_BLANK))
|
if (ISSET(QUICK_BLANK))
|
||||||
statusblank = 1;
|
statusblank = 1;
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
statusblank = 26;
|
statusblank = 26;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue