commit e0149c1d9acb574b88e81b3b99694454947c92ca
parent 374f4e2e6441df8dd9fa245c87635abb4e7abf5c
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 21 Apr 2014 11:09:30 +0000
Adjusting two comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,7 @@
2014-04-21 Benno Schulenberg <bensberg@justemail.net>
* doc/syntax/nanorc.nanorc: There is no F0 key.
+ * src/global.c (first_sc_for): Adjust two comments -- the help
+ viewer no longer sorts keys to be control first, meta second.
2014-04-16 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (get_mouseinput): Properly find also the zeroeth
diff --git a/src/global.c b/src/global.c
@@ -319,11 +319,10 @@ const sc *first_sc_for(int menu, void (*func)(void))
for (s = sclist; s != NULL; s = s->next) {
if ((s->menu & menu) && s->scfunc == func) {
- /* Try to use function keys and meta sequences as last
- * resorts. Otherwise, we will run into problems when we
- * try and handle things like the arrow keys, Home, etc., if
- * for some reason the user bound them to a function key or
- * meta sequence first *shrug*. */
+ /* Memorize the first meta sequence, first function key,
+ * and first dedicated key. The latter is needed to be
+ * able to show something when the user has rebound all
+ * other sequences for a specific func. */
if (s->type == FKEY) {
if (!fkeysc)
fkeysc = s;
@@ -343,11 +342,8 @@ const sc *first_sc_for(int menu, void (*func)(void))
}
}
- /* If we're here, we may have found only function keys or meta
- * sequences. If so, use one, with the same priority as in the
- * help browser: function keys come first, unless meta sequences are
- * available, in which case meta sequences come first. Last choice
- * is the raw key. */
+ /* If we did not find any control sequence, then prefer a
+ * meta sequence over a function key over a dedicated key. */
if (fkeysc && !metasc)
return fkeysc;
else if (metasc)