Commit 9abd1d18 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

simplify the key-interpreting logic in get_shortcut()

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 4 additions and 6 deletions
+4 -6
...@@ -1415,12 +1415,10 @@ const shortcut *get_shortcut(const shortcut *s_list, int kbinput, bool ...@@ -1415,12 +1415,10 @@ const shortcut *get_shortcut(const shortcut *s_list, int kbinput, bool
* 4. func_key is TRUE and the key is a function key in the * 4. func_key is TRUE and the key is a function key in the
* shortcut list. */ * shortcut list. */
if (kbinput != NANO_NO_KEY && ((*meta_key == FALSE && if (kbinput != NANO_NO_KEY && kbinput == s->ctrlval ||
*func_key == FALSE && kbinput == s->ctrlval) || (*meta_key == TRUE && (kbinput == s->metaval ||
(*meta_key == TRUE && *func_key == FALSE && kbinput == s->miscval)) || (*func_key == TRUE &&
(kbinput == s->metaval || kbinput == s->miscval)) || kbinput == s->funcval)) {
(*meta_key == FALSE && *func_key == TRUE &&
kbinput == s->funcval))) {
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment