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

View File

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