summaryrefslogtreecommitdiffstats
path: root/build-aux/osx/build/modulesets/patches/readline/readline62-003
blob: 0462242e0c0d5b44cee050a9218101cc81d92d24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 6.2
Patch-ID: readline62-003

Bug-Reported-by:	Max Horn <max@quendi.de>
Bug-Reference-ID:	<20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html

Bug-Description:

A change between readline-6.1 and readline-6.2 to prevent the readline input
hook from being called too frequently had the side effect of causing delays
when reading pasted input on systems such as Mac OS X.  This patch fixes
those delays while retaining the readline-6.2 behavior.

Patch (apply with `patch -p0'):

*** ../readline-6.2-patched/input.c	2010-05-30 18:33:01.000000000 -0400
--- input.c	2012-06-25 21:08:42.000000000 -0400
***************
*** 410,414 ****
  rl_read_key ()
  {
!   int c;
  
    rl_key_sequence_length++;
--- 412,416 ----
  rl_read_key ()
  {
!   int c, r;
  
    rl_key_sequence_length++;
***************
*** 430,441 ****
  	  while (rl_event_hook)
  	    {
! 	      if (rl_gather_tyi () < 0)	/* XXX - EIO */
  		{
  		  rl_done = 1;
  		  return ('\n');
  		}
  	      RL_CHECK_SIGNALS ();
- 	      if (rl_get_char (&c) != 0)
- 		break;
  	      if (rl_done)		/* XXX - experimental */
  		return ('\n');
--- 432,447 ----
  	  while (rl_event_hook)
  	    {
! 	      if (rl_get_char (&c) != 0)
! 		break;
! 		
! 	      if ((r = rl_gather_tyi ()) < 0)	/* XXX - EIO */
  		{
  		  rl_done = 1;
  		  return ('\n');
  		}
+ 	      else if (r == 1)			/* read something */
+ 		continue;
+ 
  	      RL_CHECK_SIGNALS ();
  	      if (rl_done)		/* XXX - experimental */
  		return ('\n');
*** ../readline-6.2-patched/patchlevel	2010-01-14 10:15:52.000000000 -0500
--- patchlevel	2011-11-17 11:09:35.000000000 -0500
***************
*** 1,3 ****
  # Do not edit -- exists only for use by patch
  
! 2
--- 1,3 ----
  # Do not edit -- exists only for use by patch
  
! 3