Blame SOURCES/bash42-031

ff19ae
			     BASH PATCH REPORT
ff19ae
			     =================
ff19ae
ff19ae
Bash-Release:	4.2
ff19ae
Patch-ID:	bash42-031
ff19ae
ff19ae
Bug-Reported-by:	Max Horn <max@quendi.de>
ff19ae
Bug-Reference-ID:	<20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de>
ff19ae
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html
ff19ae
ff19ae
Bug-Description:
ff19ae
ff19ae
A change between bash-4.1 and bash-4.2 to prevent the readline input hook
ff19ae
from being called too frequently had the side effect of causing delays
ff19ae
when reading pasted input on systems such as Mac OS X.  This patch fixes
ff19ae
those delays while retaining the bash-4.2 behavior.
ff19ae
ff19ae
Patch (apply with `patch -p0'):
ff19ae
ff19ae
*** ../bash-4.2-patched/lib/readline/input.c	2010-05-30 18:33:01.000000000 -0400
ff19ae
--- lib/readline/input.c	2012-06-25 21:08:42.000000000 -0400
ff19ae
***************
ff19ae
*** 410,414 ****
ff19ae
  rl_read_key ()
ff19ae
  {
ff19ae
!   int c;
ff19ae
  
ff19ae
    rl_key_sequence_length++;
ff19ae
--- 412,416 ----
ff19ae
  rl_read_key ()
ff19ae
  {
ff19ae
!   int c, r;
ff19ae
  
ff19ae
    rl_key_sequence_length++;
ff19ae
***************
ff19ae
*** 430,441 ****
ff19ae
  	  while (rl_event_hook)
ff19ae
  	    {
ff19ae
! 	      if (rl_gather_tyi () < 0)	/* XXX - EIO */
ff19ae
  		{
ff19ae
  		  rl_done = 1;
ff19ae
  		  return ('\n');
ff19ae
  		}
ff19ae
  	      RL_CHECK_SIGNALS ();
ff19ae
- 	      if (rl_get_char (&c) != 0)
ff19ae
- 		break;
ff19ae
  	      if (rl_done)		/* XXX - experimental */
ff19ae
  		return ('\n');
ff19ae
--- 432,447 ----
ff19ae
  	  while (rl_event_hook)
ff19ae
  	    {
ff19ae
! 	      if (rl_get_char (&c) != 0)
ff19ae
! 		break;
ff19ae
! 		
ff19ae
! 	      if ((r = rl_gather_tyi ()) < 0)	/* XXX - EIO */
ff19ae
  		{
ff19ae
  		  rl_done = 1;
ff19ae
  		  return ('\n');
ff19ae
  		}
ff19ae
+ 	      else if (r == 1)			/* read something */
ff19ae
+ 		continue;
ff19ae
+ 
ff19ae
  	      RL_CHECK_SIGNALS ();
ff19ae
  	      if (rl_done)		/* XXX - experimental */
ff19ae
  		return ('\n');
ff19ae
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
ff19ae
--- patchlevel.h	Thu Feb 24 21:41:34 2011
ff19ae
***************
ff19ae
*** 26,30 ****
ff19ae
     looks for to find the patch level (for the sccs version string). */
ff19ae
  
ff19ae
! #define PATCHLEVEL 30
ff19ae
  
ff19ae
  #endif /* _PATCHLEVEL_H_ */
ff19ae
--- 26,30 ----
ff19ae
     looks for to find the patch level (for the sccs version string). */
ff19ae
  
ff19ae
! #define PATCHLEVEL 31
ff19ae
  
ff19ae
  #endif /* _PATCHLEVEL_H_ */