commit bash-20040816 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:35:02 -05:00
parent 8ed8525cb1
commit de3341d16e
26 changed files with 15436 additions and 112 deletions
+5 -2
View File
@@ -692,7 +692,7 @@ _rl_vi_change_mbchar_case (count)
{
wchar_t wc;
char mb[MB_LEN_MAX+1];
int mblen;
int mblen, p;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -715,11 +715,14 @@ _rl_vi_change_mbchar_case (count)
/* Vi is kind of strange here. */
if (wc)
{
p = rl_point;
mblen = wcrtomb (mb, wc, &ps);
if (mblen >= 0)
mb[mblen] = '\0';
rl_begin_undo_group ();
rl_delete (1, 0);
rl_vi_delete (1, 0);
if (rl_point < p) /* Did we retreat at EOL? */
rl_point++; /* XXX - should we advance more than 1 for mbchar? */
rl_insert_text (mb);
rl_end_undo_group ();
rl_vi_check ();
+5 -2
View File
@@ -692,7 +692,7 @@ _rl_vi_change_mbchar_case (count)
{
wchar_t wc;
char mb[MB_LEN_MAX+1];
int mblen;
int mblen, p;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -715,11 +715,14 @@ _rl_vi_change_mbchar_case (count)
/* Vi is kind of strange here. */
if (wc)
{
p = rl_point;
mblen = wcrtomb (mb, wc, &ps);
if (mblen >= 0)
mb[mblen] = '\0';
rl_begin_undo_group ();
rl_delete (1, 0);
rl_vi_delete (1, 0);
if (rl_point < p) /* Did we retreat at EOL? */
rl_point++;
rl_insert_text (mb);
rl_end_undo_group ();
rl_vi_check ();