summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-07-10 09:43:57 -0400
committerChet Ramey <chet.ramey@case.edu>2012-07-10 09:43:57 -0400
commit7a127e743dce04c760155ea184dad81cf6e02f1d (patch)
tree65213328dfe7ebd4f7b5de61a06d631b2061d528
parentd79bb40f240c6a91f7b1617380db5f8cf8cce2a3 (diff)
downloadbash-7a127e743dce04c760155ea184dad81cf6e02f1d.tar.gz
Bash-4.2 patch 31
-rw-r--r--lib/readline/input.c12
-rw-r--r--patchlevel.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/readline/input.c b/lib/readline/input.c
index 7c74c995..b49af889 100644
--- a/lib/readline/input.c
+++ b/lib/readline/input.c
@@ -409,7 +409,7 @@ rl_clear_pending_input ()
int
rl_read_key ()
{
- int c;
+ int c, r;
rl_key_sequence_length++;
@@ -429,14 +429,18 @@ rl_read_key ()
{
while (rl_event_hook)
{
- if (rl_gather_tyi () < 0) /* XXX - EIO */
+ if (rl_get_char (&c) != 0)
+ break;
+
+ if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */
{
rl_done = 1;
return ('\n');
}
+ else if (r == 1) /* read something */
+ continue;
+
RL_CHECK_SIGNALS ();
- if (rl_get_char (&c) != 0)
- break;
if (rl_done) /* XXX - experimental */
return ('\n');
(*rl_event_hook) ();
diff --git a/patchlevel.h b/patchlevel.h
index d01a1bb6..eecb9f55 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 30
+#define PATCHLEVEL 31
#endif /* _PATCHLEVEL_H_ */