commit 051c9ba41880b78541d1ba15816d213e81daaad8
parent cb7d11b3cf627753204a28e2d7aa1a1b57d9d14b
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Apr 2014 20:26:58 +0000
Splitting the toggles into three kind-of related groups,
and not showing toggle keys that have been rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4808 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -12,6 +12,8 @@
* src/global.c (shortcut_init): List function key after meta key.
* src/help.c (help_init): Show just two shortcuts per function --
only three functions showed three, but who has an F13, F14, F15?
+ * src/help.c (help_init): Split the toggles into three groups,
+ and do not show toggle keys that have been rebound.
2014-04-21 Benno Schulenberg <bensberg@justemail.net>
* doc/syntax/nanorc.nanorc: There is no F0 key.
diff --git a/src/help.c b/src/help.c
@@ -463,10 +463,13 @@ void help_init(void)
#ifndef NANO_TINY
/* And the toggles... */
if (currmenu == MMAIN)
- for (s = sclist; s != NULL; s = s->next)
+ for (s = sclist; s != NULL; s = s->next) {
if (s->scfunc == do_toggle_void)
- ptr += sprintf(ptr, "(%s)\t\t%s %s\n",
- s->keystr, _(flagtostr(s->toggle)), _("enable/disable"));
+ ptr += sprintf(ptr, "%s\t\t%s %s\n", (s->menu == MMAIN ? s->keystr : ""),
+ _(flagtostr(s->toggle)), _("enable/disable"));
+ if (s->toggle == NO_COLOR_SYNTAX || s->toggle == TABS_TO_SPACES)
+ ptr += sprintf(ptr, "\n");
+ }
#ifndef DISABLE_NANORC
if (old_whitespace)