From 855986ffc8dff41ae3c941b652382345e532a566 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sat, 8 Dec 2012 00:34:12 -0800 Subject: [PATCH] applying bash42-031 --- lib/readline/input.c | 12 ++++++++---- patchlevel.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/readline/input.c b/lib/readline/input.c index 7c74c99..b49af88 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 d01a1bb..eecb9f5 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_ */ -- 2.7.4