[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/7] options: add --minibar and -_ for activating basic state-inf
From: |
Benno Schulenberg |
Subject: |
[PATCH 3/7] options: add --minibar and -_ for activating basic state-information bar |
Date: |
Tue, 15 Dec 2020 10:44:05 +0100 |
---
src/nano.c | 7 ++++++-
src/rcfile.c | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/nano.c b/src/nano.c
index 5fc731f1..535ae897 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -641,6 +641,7 @@ void usage(void)
print_opt("-z", "--suspendable", N_("Enable suspension"));
#ifndef NANO_TINY
print_opt("-%", "--stateflags", N_("Show some states on the title
bar"));
+ print_opt("-_", "--minibar", N_("Show bar at bottom with some state
info"));
#endif
#ifdef HAVE_LIBMAGIC
print_opt("-!", "--magic", N_("Also try magic to determine syntax"));
@@ -1742,6 +1743,7 @@ int main(int argc, char **argv)
{"wordbounds", 0, NULL, 'W'},
{"wordchars", 1, NULL, 'X'},
{"zap", 0, NULL, 'Z'},
+ {"minibar", 0, NULL, '_'},
{"atblanks", 0, NULL, 'a'},
{"emptyline", 0, NULL, 'e'},
{"autoindent", 0, NULL, 'i'},
@@ -1806,7 +1808,7 @@ int main(int argc, char **argv)
SET(RESTRICTED);
while ((optchr = getopt_long(argc, argv,
"ABC:DEFGHIJ:KLMNOPQ:RST:UVWX:Y:Z"
- "abcdef:ghijklmno:pqr:s:tuvwxyz$%!",
long_options, NULL)) != -1) {
+ "abcdef:ghijklmno:pqr:s:tuvwxyz$_%!",
long_options, NULL)) != -1) {
switch (optchr) {
#ifndef NANO_TINY
case 'A':
@@ -1926,6 +1928,9 @@ int main(int argc, char **argv)
case 'Z':
SET(LET_THEM_ZAP);
break;
+ case '_':
+ SET(MINIBAR);
+ break;
case 'a':
SET(AT_BLANKS);
break;
diff --git a/src/rcfile.c b/src/rcfile.c
index ef410369..d14d9994 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -110,6 +110,7 @@ static const rcoption rcopts[] = {
{"jumpyscrolling", JUMPY_SCROLLING},
{"locking", LOCKING},
{"matchbrackets", 0},
+ {"minibar", MINIBAR},
{"noconvert", NO_CONVERT},
{"showcursor", SHOW_CURSOR},
{"smarthome", SMART_HOME},
--
2.29.2
- [PATCH 1/7] tweaks: move the displaying of the state letters into a separate function, Benno Schulenberg, 2020/12/15
- [PATCH 2/7] display: add code for showing minimal state-information bar at the bottom, Benno Schulenberg, 2020/12/15
- [PATCH 3/7] options: add --minibar and -_ for activating basic state-information bar,
Benno Schulenberg <=
- [PATCH 4/7] minibar: show the info bar again some 0.8 seconds after a message, Benno Schulenberg, 2020/12/15
- [PATCH 5/7] feedback: differentiate between remarks, mistakes, and information, Benno Schulenberg, 2020/12/15
- [PATCH 6/7] minibar: add an [x/y] "counter" when multiple files are open, Benno Schulenberg, 2020/12/15
- [PATCH 7/7] minibar: show the line count in the bar (at startup and when switching), Benno Schulenberg, 2020/12/15