# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/base/bash/bash2/overwrite-fixes.patch
|
|
# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
|
|
#
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
# of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
--- ./lib/readline/text.c.orig 2002-05-30 20:46:13.000000000 +0300
|
|
+++ ./lib/readline/text.c 2002-12-21 09:02:22.000000000 +0200
|
|
@@ -801,13 +801,10 @@
|
|
k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
|
|
#endif
|
|
|
|
+ rl_begin_undo_group ();
|
|
+
|
|
for (i = 0; i < count; i++)
|
|
{
|
|
- rl_begin_undo_group ();
|
|
-
|
|
- if (rl_point < rl_end)
|
|
- rl_delete (1, c);
|
|
-
|
|
#if defined (HANDLE_MULTIBYTE)
|
|
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
|
rl_insert_text (mbkey);
|
|
@@ -815,9 +812,13 @@
|
|
#endif
|
|
_rl_insert_char (1, c);
|
|
|
|
- rl_end_undo_group ();
|
|
+ if (rl_point < rl_end)
|
|
+ rl_delete (1, c);
|
|
+
|
|
}
|
|
|
|
+ rl_end_undo_group ();
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
@@ -934,10 +935,13 @@
|
|
else
|
|
rl_delete_text (opoint, rl_point);
|
|
|
|
- /* Emacs puts point at the beginning of the sequence of spaces. */
|
|
- opoint = rl_point;
|
|
- _rl_insert_char (l, ' ');
|
|
- rl_point = opoint;
|
|
+ if (rl_point < rl_end)
|
|
+ {
|
|
+ /* Emacs puts point at the beginning of the sequence of spaces. */
|
|
+ opoint = rl_point;
|
|
+ _rl_insert_char (l, ' ');
|
|
+ rl_point = opoint;
|
|
+ }
|
|
|
|
rl_end_undo_group ();
|
|
|