diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-12-21 23:50:56 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-12-21 23:50:56 -0800 |
commit | 3dda99014cf73d7110613f64da40d92601a6c6e1 (patch) | |
tree | 3c7bd635f9129298199c71cf609200c9166c8896 /src/lua.c | |
parent | a9e400bbb49c283bb6ab4c83d3c045f755317464 (diff) | |
download | teliva-3dda99014cf73d7110613f64da40d92601a6c6e1.tar.gz |
fix arrow keys in big picture view on Mac
Turns out arrow keys are considered `isprint()` on Mac.
Diffstat (limited to 'src/lua.c')
-rw-r--r-- | src/lua.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua.c b/src/lua.c index eef4bdd..aac2d52 100644 --- a/src/lua.c +++ b/src/lua.c @@ -1024,11 +1024,6 @@ restart: } else if (c == CTRL_R) { recent_changes_view(L); goto restart; - } else if (isprint(c)) { - if (qlen < CURRENT_DEFINITION_LEN) { - query[qlen++] = c; - query[qlen] = '\0'; - } } else if (c == KEY_LEFT) { highlight_index_within_level--; if (highlight_index_within_level < 0) highlight_index_within_level = 0; @@ -1058,6 +1053,11 @@ restart: int back_to_big_picture = edit_current_definition(L); if (back_to_big_picture) goto restart; return; + } else if (isprint(c)) { + if (qlen < CURRENT_DEFINITION_LEN) { + query[qlen++] = c; + query[qlen] = '\0'; + } } } /* never gets here */ |