commit 2e83a50e952da5c0bea15514a48ce841fb58e911
parent 3d002ed602d8cd6386707fac9ee9aba92e8740b8
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Mon, 1 Nov 2004 22:35:26 +0000
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
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -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';
}