Blame SOURCES/readline62-003

3b2acc
			   READLINE PATCH REPORT
3b2acc
			   =====================
3b2acc
3b2acc
Readline-Release: 6.2
3b2acc
Patch-ID: readline62-003
3b2acc
3b2acc
Bug-Reported-by:	Max Horn <max@quendi.de>
3b2acc
Bug-Reference-ID:	<20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de>
3b2acc
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html
3b2acc
3b2acc
Bug-Description:
3b2acc
3b2acc
A change between readline-6.1 and readline-6.2 to prevent the readline input
3b2acc
hook from being called too frequently had the side effect of causing delays
3b2acc
when reading pasted input on systems such as Mac OS X.  This patch fixes
3b2acc
those delays while retaining the readline-6.2 behavior.
3b2acc
3b2acc
Patch (apply with `patch -p0'):
3b2acc
3b2acc
*** ../readline-6.2-patched/input.c	2010-05-30 18:33:01.000000000 -0400
3b2acc
--- input.c	2012-06-25 21:08:42.000000000 -0400
3b2acc
***************
3b2acc
*** 410,414 ****
3b2acc
  rl_read_key ()
3b2acc
  {
3b2acc
!   int c;
3b2acc
  
3b2acc
    rl_key_sequence_length++;
3b2acc
--- 412,416 ----
3b2acc
  rl_read_key ()
3b2acc
  {
3b2acc
!   int c, r;
3b2acc
  
3b2acc
    rl_key_sequence_length++;
3b2acc
***************
3b2acc
*** 430,441 ****
3b2acc
  	  while (rl_event_hook)
3b2acc
  	    {
3b2acc
! 	      if (rl_gather_tyi () < 0)	/* XXX - EIO */
3b2acc
  		{
3b2acc
  		  rl_done = 1;
3b2acc
  		  return ('\n');
3b2acc
  		}
3b2acc
  	      RL_CHECK_SIGNALS ();
3b2acc
- 	      if (rl_get_char (&c) != 0)
3b2acc
- 		break;
3b2acc
  	      if (rl_done)		/* XXX - experimental */
3b2acc
  		return ('\n');
3b2acc
--- 432,447 ----
3b2acc
  	  while (rl_event_hook)
3b2acc
  	    {
3b2acc
! 	      if (rl_get_char (&c) != 0)
3b2acc
! 		break;
3b2acc
! 		
3b2acc
! 	      if ((r = rl_gather_tyi ()) < 0)	/* XXX - EIO */
3b2acc
  		{
3b2acc
  		  rl_done = 1;
3b2acc
  		  return ('\n');
3b2acc
  		}
3b2acc
+ 	      else if (r == 1)			/* read something */
3b2acc
+ 		continue;
3b2acc
+ 
3b2acc
  	      RL_CHECK_SIGNALS ();
3b2acc
  	      if (rl_done)		/* XXX - experimental */
3b2acc
  		return ('\n');