From efb4b0a96cab1c8cba6b154351e5a645b4d471fd Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 19 Apr 2006 14:09:01 +0000 Subject: [PATCH] add several blank entries to the main shortcut list, in order to make its help text easier to read git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/global.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca66f481..c534d881 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,10 @@ CVS code - width isn't a clean multiple of the column width. Changes to do_mouseinput() and bottombars(). (Benno Schulenberg, minor tweaks by DLR) + - Add several blank entries to the main shortcut list, in order + to make its help text easier to read. Changes to + sc_init_one() and shortcut_init(). (DLR, suggested by Benno + Schulenberg) - files.c: open_file() - Remove redundant wording in the error message when we try to diff --git a/src/global.c b/src/global.c index 438dc6dc..d688e22f 100644 --- a/src/global.c +++ b/src/global.c @@ -239,9 +239,9 @@ void sc_init_one(shortcut **shortcutage, int ctrlval, const char *desc, } s->ctrlval = ctrlval; - s->desc = _(desc); + s->desc = (desc == NULL) ? "" : _(desc); #ifndef DISABLE_HELP - s->help = _(help); + s->help = (help == NULL) ? "" : _(help); #endif s->metaval = metaval; s->funcval = funcval; @@ -558,6 +558,14 @@ void shortcut_init(bool unjustify) NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, do_research); #endif +#ifndef DISABLE_HELP + /* This entry is blank, in order to make the help text easier to + * read. */ + sc_init_one(&main_list, NANO_NO_KEY, NULL, + IFHELP(NULL, NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, + NULL); +#endif + sc_init_one(&main_list, NANO_PREVLINE_KEY, N_("Prev Line"), IFHELP(nano_prevline_msg, NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, do_up); @@ -602,6 +610,14 @@ void shortcut_init(bool unjustify) IFHELP(nano_enter_msg, NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_enter); +#ifndef DISABLE_HELP + /* This entry is blank, in order to make the help text easier to + * read. */ + sc_init_one(&main_list, NANO_NO_KEY, NULL, + IFHELP(NULL, NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, + NULL); +#endif + #ifndef NANO_TINY sc_init_one(&main_list, NANO_NEXTWORD_KEY, N_("Next Word"), IFHELP(nano_nextword_msg, NANO_NO_KEY), NANO_NO_KEY, @@ -664,6 +680,15 @@ void shortcut_init(bool unjustify) sc_init_one(&main_list, NANO_NO_KEY, N_("Find Other Bracket"), IFHELP(nano_bracket_msg, NANO_BRACKET_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, do_find_bracket); + +#ifndef DISABLE_HELP + /* This entry is blank, in order to make the help text easier to + * read. It's at the end of the list in order to separate the + * shortcut keys from the toggles. */ + sc_init_one(&main_list, NANO_NO_KEY, NULL, + IFHELP(NULL, NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, + NULL); +#endif #endif free_shortcutage(&whereis_list); -- 2.39.5