From: Benno Schulenberg Date: Mon, 21 Apr 2014 11:09:30 +0000 (+0000) Subject: Adjusting two comments. X-Git-Tag: v2.3.3~142 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e0149c1d9acb574b88e81b3b99694454947c92ca;p=nano.git Adjusting two comments. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 98969176..53fc256c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-04-21 Benno Schulenberg * 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 * src/winio.c (get_mouseinput): Properly find also the zeroeth diff --git a/src/global.c b/src/global.c index 98555ced..bf6fea54 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)