diff --git a/ChangeLog b/ChangeLog index 9896917661ac3f848a98986417dcff6f7a25258e..53fc256c44d28afd44ac7aa9ff40786994a2960f 100644 --- 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 index 98555ced59503bbf09a277ef56be4bdac2e7ef57..bf6fea54591b6ec54af2a599091528e9e0fcbfee 100644 --- 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)