]> git.wh0rd.org Git - nano.git/commitdiff
properly handle the case of a function key with no preceding control key
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 1 Nov 2004 22:35:26 +0000 (22:35 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 1 Nov 2004 22:35:26 +0000 (22:35 +0000)
in the help browser

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2040 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/nano.c

index da9c192dc1a3013f9a62fa844cf3a3d0a8416092..50d0bf194841e7bae2122c0ddce09fb2b2947158 100644 (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';
        }