~torsknod/+junk/bash-package

« back to all changes in this revision

Viewing changes to debian/patches/bash42-031.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-07-12 23:52:40 UTC
  • mfrom: (2.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120712235240-sj3e8m92irohuvzk
Tags: 4.2-4ubuntu1
Merge with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
Index: b/bash/lib/readline/input.c
 
21
===================================================================
 
22
--- a/bash/lib/readline/input.c
 
23
+++ b/bash/lib/readline/input.c
 
24
@@ -409,7 +409,7 @@
 
25
 int
 
26
 rl_read_key ()
 
27
 {
 
28
-  int c;
 
29
+  int c, r;
 
30
 
 
31
   rl_key_sequence_length++;
 
32
 
 
33
@@ -429,14 +429,18 @@
 
34
        {
 
35
          while (rl_event_hook)
 
36
            {
 
37
-             if (rl_gather_tyi () < 0) /* XXX - EIO */
 
38
+             if (rl_get_char (&c) != 0)
 
39
+               break;
 
40
+               
 
41
+             if ((r = rl_gather_tyi ()) < 0)   /* XXX - EIO */
 
42
                {
 
43
                  rl_done = 1;
 
44
                  return ('\n');
 
45
                }
 
46
+             else if (r == 1)                  /* read something */
 
47
+               continue;
 
48
+
 
49
              RL_CHECK_SIGNALS ();
 
50
-             if (rl_get_char (&c) != 0)
 
51
-               break;
 
52
              if (rl_done)              /* XXX - experimental */
 
53
                return ('\n');
 
54
              (*rl_event_hook) ();
 
55
Index: b/bash/patchlevel.h
 
56
===================================================================
 
57
--- a/bash/patchlevel.h
 
58
+++ b/bash/patchlevel.h
 
59
@@ -25,6 +25,6 @@
 
60
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
 
61
    looks for to find the patch level (for the sccs version string). */
 
62
 
 
63
-#define PATCHLEVEL 30
 
64
+#define PATCHLEVEL 31
 
65
 
 
66
 #endif /* _PATCHLEVEL_H_ */