diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-16 20:08:51 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-16 20:10:49 -0700 |
commit | 86170ce65a9239abf33c1ca094aefdab065df53b (patch) | |
tree | 2a0d9a48f158c5d805d1c7d9a2f5c3ec26cc0088 | |
parent | 0773e6fb700e6ced3bbb3b026ca582ade4088490 (diff) |
Support UP/DOWN arrow
-rw-r--r-- | fzy.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -198,6 +198,16 @@ void run(tty_t *tty){ }else if(ch == 10){ /* Enter */ clear(tty); emit(tty); + }else if(ch == 27){ /* ESC */ + ch = tty_getchar(tty); + if(ch == '['){ + ch = tty_getchar(tty); + if(ch == 'A'){ /* UP ARROW */ + action_prev(); + }else if(ch == 'B'){ /* DOWN ARROW */ + action_next(); + } + } } }while(1); } |