mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/bash/bash2/overwrite-fixes.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- ./lib/readline/text.c.orig 2002-05-30 20:46:13.000000000 +0300
  20. +++ ./lib/readline/text.c 2002-12-21 09:02:22.000000000 +0200
  21. @@ -801,13 +801,10 @@
  22. k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
  23. #endif
  24. + rl_begin_undo_group ();
  25. +
  26. for (i = 0; i < count; i++)
  27. {
  28. - rl_begin_undo_group ();
  29. -
  30. - if (rl_point < rl_end)
  31. - rl_delete (1, c);
  32. -
  33. #if defined (HANDLE_MULTIBYTE)
  34. if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
  35. rl_insert_text (mbkey);
  36. @@ -815,9 +812,13 @@
  37. #endif
  38. _rl_insert_char (1, c);
  39. - rl_end_undo_group ();
  40. + if (rl_point < rl_end)
  41. + rl_delete (1, c);
  42. +
  43. }
  44. + rl_end_undo_group ();
  45. +
  46. return 0;
  47. }
  48. @@ -934,10 +935,13 @@
  49. else
  50. rl_delete_text (opoint, rl_point);
  51. - /* Emacs puts point at the beginning of the sequence of spaces. */
  52. - opoint = rl_point;
  53. - _rl_insert_char (l, ' ');
  54. - rl_point = opoint;
  55. + if (rl_point < rl_end)
  56. + {
  57. + /* Emacs puts point at the beginning of the sequence of spaces. */
  58. + opoint = rl_point;
  59. + _rl_insert_char (l, ' ');
  60. + rl_point = opoint;
  61. + }
  62. rl_end_undo_group ();