commit bash-20200527 snapshot

This commit is contained in:
Chet Ramey
2020-05-29 14:29:34 -04:00
parent ce1a3c07c4
commit 37adc8b99d
23 changed files with 443 additions and 601 deletions
+3
View File
@@ -820,7 +820,10 @@ _rl_bracketed_read_mbstring (char *mb, int mlen)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
c = _rl_read_mbstring (c, mb, mlen);
else
#endif
mb[0] = c;
mb[mlen] = '\0'; /* just in case */
return c;
}
+8 -6
View File
@@ -2014,10 +2014,11 @@ _rl_vi_callback_change_char (_rl_callback_generic_arg *data)
c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
#if defined (HANDLE_MULTIBYTE)
strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX);
#else
_rl_vi_last_replacement[0] = c;
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX);
else
#endif
_rl_vi_last_replacement[0] = c;
_rl_vi_last_replacement[MB_LEN_MAX] = '\0'; /* XXX */
if (c < 0)
@@ -2054,10 +2055,11 @@ rl_vi_change_char (int count, int key)
{
c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
#ifdef HANDLE_MULTIBYTE
strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX);
#else
_rl_vi_last_replacement[0] = c;
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
strncpy (_rl_vi_last_replacement, mb, MB_LEN_MAX);
else
#endif
_rl_vi_last_replacement[0] = c;
_rl_vi_last_replacement[MB_LEN_MAX] = '\0'; /* just in case */
}