diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-12-10 00:38:21 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-12-10 00:38:21 +0000 |
commit | 696c1455998a8282b23155449eda880aab157858 (patch) | |
tree | 7331221c1b9695a95e4c5ed2a7a435477ef715ac /termkey.c | |
parent | ef669c134d9352d88ae020803c7ee280083523f8 (diff) | |
download | termo-696c1455998a8282b23155449eda880aab157858.tar.gz termo-696c1455998a8282b23155449eda880aab157858.tar.xz termo-696c1455998a8282b23155449eda880aab157858.zip |
Make termkey_getkey() set a peeked key structure if it returns TERMKEY_RET_AGAIN
Diffstat (limited to 'termkey.c')
-rw-r--r-- | termkey.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -679,6 +679,11 @@ termkey_result termkey_getkey(termkey_t *tk, termkey_key *key) if(ret == TERMKEY_RES_KEY) eat_bytes(tk, nbytes); + if(ret == TERMKEY_RES_AGAIN) + /* Call peekkey() again in force mode to obtain whatever it can */ + (void)peekkey(tk, key, 1, &nbytes); + /* Don't eat it yet though */ + return ret; } |