]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
Readline-6.2 patch 3
authorChet Ramey <chet.ramey@case.edu>
Tue, 10 Jul 2012 13:47:21 +0000 (09:47 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 10 Jul 2012 13:47:21 +0000 (09:47 -0400)
input.c
patchlevel

diff --git a/input.c b/input.c
index 7c74c99508911f98889eec9c176f212a52c2766a..b49af889cf686ac4c9398c1769d9679e141557e8 100644 (file)
--- a/input.c
+++ b/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) ();
index 7cbda82ded86fa174ee44dba637d5fa80815bfdc..ce3e35565330d4faf05e7f91c30ce66182f764fd 100644 (file)
@@ -1,3 +1,3 @@
 # Do not edit -- exists only for use by patch
 
-2
+3