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