File bash-2.05b-vimode.patch of Package compat-readline4
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-002
|
|Bug-Reported-by: rwhron@earthlink.net
|Bug-Reference-ID: <20020724000454.GA15210@rushmore> (bug-bash)
|Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004856.html
|
|Bug-Description:
|
|Repeating an edit in vi-mode with `.' does not work.
|
|Patch:
--- lib/readline/readline.c
+++ lib/readline/readline.c Thu Mar 25 15:48:02 2004
@@ -684,6 +684,7 @@
}
#if defined (VI_MODE)
if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
_rl_vi_textmod_command (key))
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
#endif
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-007
|
|Bug-Reported-by: dman@dman.ddts.net
|Bug-Reference-ID: <15893.26358.129589.503364@gargle.gargle.HOWL>
|Bug-Reference-URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=175127
|
|Bug-Description:
|
|Using the vi editing mode's case-changing commands in a locale with
|multibyte characters will cause garbage characters to be inserted into
|the editing buffer.
|
|Patch:
--- lib/readline/vi_mode.c
+++ lib/readline/vi_mode.c Thu Mar 25 16:05:33 2004
@@ -680,7 +680,8 @@
int count;
{
wchar_t wc;
- char mb[MB_LEN_MAX];
+ char mb[MB_LEN_MAX+1];
+ int mblen;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -703,7 +704,9 @@
/* Vi is kind of strange here. */
if (wc)
{
- wctomb (mb, wc);
+ mblen = wctomb (mb, wc);
+ if (mblen >= 0)
+ mb[mblen] = '\0';
rl_begin_undo_group ();
rl_delete (1, 0);
rl_insert_text (mb);