Blame SOURCES/readline62-003

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