commit 8d8f5788ce5476539cb4b9870e24f1c26c34080d
parent 4a268678a5d00a642bd2c123e20d6e10b3b075a5
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 19 Jul 2018 19:47:49 +0200
rcfile: do not accept rebinding F0 nor function keys above F16
To match the documentation and to match what the nanorc.nanorc
colors as valid.
In theory it would be possible to allow rebinding also F17...F63,
but nano does not recognize escape sequences for these high-order
function keys. As no one ever complained about unknown sequences
when pressing function keys, I am guessing that no one has these
high-order keys, or at least that no one uses them.
This fixes https://savannah.gnu.org/bugs/?54332.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/global.c b/src/global.c
@@ -461,7 +461,7 @@ int keycode_from_string(const char *keystring)
return -1;
} else if (keystring[0] == 'F') {
int fn = atoi(&keystring[1]);
- if (fn < 0 || fn > 63)
+ if (fn < 1 || fn > 16)
return -1;
return KEY_F0 + fn;
} else if (!strcasecmp(keystring, "Ins"))