mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-25 02:32:16 +03:00
input: optimize a bit for non-shortcut keys, as they are most frequent
This commit is contained in:
parent
f66432e999
commit
0e0fb452a3
@ -1764,6 +1764,10 @@ const sc *get_shortcut(int *kbinput)
|
||||
*kbinput, meta_key ? "TRUE" : "FALSE");
|
||||
#endif
|
||||
|
||||
/* Plain characters cannot be shortcuts, so just skip those. */
|
||||
if (!meta_key && (*kbinput & 0x7F) >= 0x20 && *kbinput <= 0xFF)
|
||||
return NULL;
|
||||
|
||||
for (s = sclist; s != NULL; s = s->next) {
|
||||
if ((s->menus & currmenu) && *kbinput == s->keycode &&
|
||||
meta_key == s->meta) {
|
||||
|
Loading…
Reference in New Issue
Block a user