nalika / rpms / bash

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