From 1ac2c4cd4fd2263d46b45f54e5b91af70f41b651 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 7 Jan 2016 15:42:44 +0000 Subject: [PATCH] Adding a comment and using a symbolic value. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5537 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + src/global.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3cc6a3aa..6ca20208 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2016-01-07 Benno Schulenberg * src/global.c (assign_keyinfo): Delete two unneeded #ifdefs: if they /could/ be false, the H and E keys would stop working. + * src/global.c (assign_keyinfo): Add a comment and use a symbol. 2016-01-04 Benno Schulenberg * src/global.c (shortcut_init): Nowadays the functions are defined diff --git a/src/global.c b/src/global.c index cd1dccf0..294ccdbc 100644 --- a/src/global.c +++ b/src/global.c @@ -441,8 +441,11 @@ void assign_keyinfo(sc *s) s->seq = KEY_DC; else if (!strcasecmp(s->keystr, "Bsp")) s->seq = KEY_BACKSPACE; + /* The Tab and Enter keys don't actually produce special codes + * but the exact integer values of ^I and ^M. Rebinding the + * latter therefore also rebinds Tab and Enter. */ else if (!strcasecmp(s->keystr, "Tab")) - s->seq = 9; + s->seq = NANO_CONTROL_I; else if (!strcasecmp(s->keystr, "Enter")) s->seq = KEY_ENTER; else if (!strcasecmp(s->keystr, "PgUp")) -- 2.39.5