nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 9abd1d18e4fcc33d2b97ff5f09caa03ce46b4873
parent 7975408f66bfb06c4f572fefb0a840912b211545
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Sat, 23 Oct 2004 13:50:57 +0000

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

Diffstat:
Msrc/winio.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -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 * shortcut list. */ - if (kbinput != NANO_NO_KEY && ((*meta_key == FALSE && - *func_key == FALSE && kbinput == s->ctrlval) || - (*meta_key == TRUE && *func_key == FALSE && - (kbinput == s->metaval || kbinput == s->miscval)) || - (*meta_key == FALSE && *func_key == TRUE && - kbinput == s->funcval))) { + if (kbinput != NANO_NO_KEY && kbinput == s->ctrlval || + (*meta_key == TRUE && (kbinput == s->metaval || + kbinput == s->miscval)) || (*func_key == TRUE && + kbinput == s->funcval)) { break; }