revert erroneous help_init() changes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2683 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-06-15 23:33:54 +00:00
parent 6f143c8124
commit 40ad177210
2 changed files with 11 additions and 14 deletions

View File

@ -92,9 +92,9 @@ CVS code -
affect tabs entered using verbatim input, and that it's
disabled when NANO_SMALL is defined. Also, change the short
command line option for --backupdir from -E to -C. Changes to
toggle_init(), help_init(), usage(), do_tab(), main(),
nanorc.sample, nano.1, nanorc.5, and nano.texi. (DLR,
suggested by many people)
toggle_init(), usage(), do_tab(), main(), nanorc.sample,
nano.1, nanorc.5, and nano.texi. (DLR, suggested by many
people)
- chars.c:
make_mbstring()
- Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a

View File

@ -509,7 +509,8 @@ void help_init(void)
*(ptr++) = '\t';
}
/* Primary meta key sequence. */
/* Primary meta key sequence. If it's the first entry, don't
* put parentheses around it. */
if (s->metaval != NANO_NO_KEY) {
entries++;
/* If this is the last entry, put it at the end. */
@ -517,19 +518,15 @@ void help_init(void)
entries++;
*(ptr++) = '\t';
}
/* If the primary meta key sequence is the first entry,
* don't put parentheses around it. */
if (entries == 1) {
/* Yucky sentinel values we can't handle a better
/* Yucky sentinel values that we can't handle a better
* way. */
if (s->metaval == NANO_ALT_SPACE) {
if (s->metaval == NANO_ALT_SPACE && entries == 1) {
char *space_ptr = display_string(_("Space"), 0, 5,
FALSE);
ptr += sprintf(ptr, "M-%s", space_ptr);
free(space_ptr);
}
} else
/* Normal values. */
ptr += sprintf(ptr, (entries == 1) ? "M-%c" : "(M-%c)",