properly handle the case of a function key with no preceding control key

in the help browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2040 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-11-01 22:35:26 +00:00
parent 3d002ed602
commit 2e83a50e95
1 changed files with 5 additions and 0 deletions

View File

@ -442,6 +442,11 @@ void help_init(void)
/* Function key. */
if (s->funcval != NANO_NO_KEY) {
entries++;
/* If this is the first entry, put it in the middle. */
if (entries == 1) {
entries++;
*(ptr++) = '\t';
}
ptr += sprintf(ptr, "(F%d)", s->funcval - KEY_F0);
*(ptr++) = '\t';
}