bash-4.2-031.patch 2.0 KB

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