]>
Commit | Line | Data |
---|---|---|
e5ec3c9c ER |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 4.2 | |
5 | Patch-ID: bash42-031 | |
6 | ||
7 | Bug-Reported-by: Max Horn <max@quendi.de> | |
8 | Bug-Reference-ID: <20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de> | |
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | A change between bash-4.1 and bash-4.2 to prevent the readline input hook | |
14 | from being called too frequently had the side effect of causing delays | |
15 | when reading pasted input on systems such as Mac OS X. This patch fixes | |
16 | those delays while retaining the bash-4.2 behavior. | |
17 | ||
18 | Patch (apply with `patch -p0'): | |
19 | ||
20 | *** ../bash-4.2-patched/lib/readline/input.c 2010-05-30 18:33:01.000000000 -0400 | |
21 | --- lib/readline/input.c 2012-06-25 21:08:42.000000000 -0400 | |
22 | *************** | |
23 | *** 410,414 **** | |
24 | rl_read_key () | |
25 | { | |
26 | ! int c; | |
27 | ||
28 | rl_key_sequence_length++; | |
29 | --- 412,416 ---- | |
30 | rl_read_key () | |
31 | { | |
32 | ! int c, r; | |
33 | ||
34 | rl_key_sequence_length++; | |
35 | *************** | |
36 | *** 430,441 **** | |
37 | while (rl_event_hook) | |
38 | { | |
39 | ! if (rl_gather_tyi () < 0) /* XXX - EIO */ | |
40 | { | |
41 | rl_done = 1; | |
42 | return ('\n'); | |
43 | } | |
44 | RL_CHECK_SIGNALS (); | |
45 | - if (rl_get_char (&c) != 0) | |
46 | - break; | |
47 | if (rl_done) /* XXX - experimental */ | |
48 | return ('\n'); | |
49 | --- 432,447 ---- | |
50 | while (rl_event_hook) | |
51 | { | |
52 | ! if (rl_get_char (&c) != 0) | |
53 | ! break; | |
54 | ! | |
55 | ! if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ | |
56 | { | |
57 | rl_done = 1; | |
58 | return ('\n'); | |
59 | } | |
60 | + else if (r == 1) /* read something */ | |
61 | + continue; | |
62 | + | |
63 | RL_CHECK_SIGNALS (); | |
64 | if (rl_done) /* XXX - experimental */ | |
65 | return ('\n'); | |
66 | *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 | |
67 | --- patchlevel.h Thu Feb 24 21:41:34 2011 | |
68 | *************** | |
69 | *** 26,30 **** | |
70 | looks for to find the patch level (for the sccs version string). */ | |
71 | ||
72 | ! #define PATCHLEVEL 30 | |
73 | ||
74 | #endif /* _PATCHLEVEL_H_ */ | |
75 | --- 26,30 ---- | |
76 | looks for to find the patch level (for the sccs version string). */ | |
77 | ||
78 | ! #define PATCHLEVEL 31 | |
79 | ||
80 | #endif /* _PATCHLEVEL_H_ */ |