options: add -e, --emptyline, the counterpart of --morespace
parent
401e43969c
commit
ee979ae7b3
14
src/nano.c
14
src/nano.c
|
@ -850,6 +850,7 @@ void usage(void)
|
||||||
print_opt("-c", "--constantshow", N_("Constantly show cursor position"));
|
print_opt("-c", "--constantshow", N_("Constantly show cursor position"));
|
||||||
print_opt("-d", "--rebinddelete",
|
print_opt("-d", "--rebinddelete",
|
||||||
N_("Fix Backspace/Delete confusion problem"));
|
N_("Fix Backspace/Delete confusion problem"));
|
||||||
|
print_opt("-e", "--emptyline", N_("Keep the line below the title bar empty"));
|
||||||
print_opt("-f", "--finalnewline", N_("Ensure that text ends with a newline"));
|
print_opt("-f", "--finalnewline", N_("Ensure that text ends with a newline"));
|
||||||
#ifdef ENABLE_BROWSER
|
#ifdef ENABLE_BROWSER
|
||||||
if (!ISSET(RESTRICTED))
|
if (!ISSET(RESTRICTED))
|
||||||
|
@ -1983,6 +1984,7 @@ int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
{"constantshow", 0, NULL, 'c'},
|
{"constantshow", 0, NULL, 'c'},
|
||||||
{"rebinddelete", 0, NULL, 'd'},
|
{"rebinddelete", 0, NULL, 'd'},
|
||||||
|
{"emptyline", 0, NULL, 'e'},
|
||||||
{"finalnewline", 0, NULL, 'f'},
|
{"finalnewline", 0, NULL, 'f'},
|
||||||
#ifdef ENABLE_BROWSER
|
#ifdef ENABLE_BROWSER
|
||||||
{"showcursor", 0, NULL, 'g'},
|
{"showcursor", 0, NULL, 'g'},
|
||||||
|
@ -2090,7 +2092,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
while ((optchr =
|
while ((optchr =
|
||||||
getopt_long(argc, argv,
|
getopt_long(argc, argv,
|
||||||
"ABC:DEFGHIKLMNOPQ:RST:UVWX:Y:Zabcdfghijklmno:pr:s:tuvwxyz$",
|
"ABC:DEFGHIKLMNOPQ:RST:UVWX:Y:Zabcdefghijklmno:pr:s:tuvwxyz$",
|
||||||
long_options, NULL)) != -1) {
|
long_options, NULL)) != -1) {
|
||||||
switch (optchr) {
|
switch (optchr) {
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
@ -2149,7 +2151,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'O':
|
case 'O':
|
||||||
SET(MORE_SPACE);
|
UNSET(EMPTY_LINE);
|
||||||
break;
|
break;
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
case 'P':
|
case 'P':
|
||||||
|
@ -2214,6 +2216,9 @@ int main(int argc, char **argv)
|
||||||
case 'd':
|
case 'd':
|
||||||
SET(REBIND_DELETE);
|
SET(REBIND_DELETE);
|
||||||
break;
|
break;
|
||||||
|
case 'e':
|
||||||
|
SET(EMPTY_LINE);
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
SET(FINAL_NEWLINE);
|
SET(FINAL_NEWLINE);
|
||||||
break;
|
break;
|
||||||
|
@ -2426,6 +2431,11 @@ int main(int argc, char **argv)
|
||||||
else
|
else
|
||||||
SET(SMOOTH_SCROLL);
|
SET(SMOOTH_SCROLL);
|
||||||
|
|
||||||
|
if (ISSET(EMPTY_LINE))
|
||||||
|
UNSET(MORE_SPACE);
|
||||||
|
else
|
||||||
|
SET(MORE_SPACE);
|
||||||
|
|
||||||
/* If the user wants bold instead of reverse video for hilited text... */
|
/* If the user wants bold instead of reverse video for hilited text... */
|
||||||
if (ISSET(BOLD_TEXT))
|
if (ISSET(BOLD_TEXT))
|
||||||
hilite_attribute = A_BOLD;
|
hilite_attribute = A_BOLD;
|
||||||
|
|
|
@ -543,7 +543,8 @@ enum
|
||||||
LET_THEM_ZAP,
|
LET_THEM_ZAP,
|
||||||
BREAK_LONG_LINES,
|
BREAK_LONG_LINES,
|
||||||
FINAL_NEWLINE,
|
FINAL_NEWLINE,
|
||||||
JUMPY_SCROLLING
|
JUMPY_SCROLLING,
|
||||||
|
EMPTY_LINE
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Flags for the menus in which a given function should be present. */
|
/* Flags for the menus in which a given function should be present. */
|
||||||
|
|
Loading…
Reference in New Issue