Bash-4.2 patch 31
authorChet Ramey <chet.ramey@case.edu>
Tue, 10 Jul 2012 13:43:57 +0000 (09:43 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 10 Jul 2012 13:43:57 +0000 (09:43 -0400)
lib/readline/input.c
patchlevel.h

index 7c74c99..b49af88 100644 (file)
@@ -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) ();
index d01a1bb..eecb9f5 100644 (file)
@@ -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_ */