mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 14:39:37 +00:00
Official patches 001-005
PR: 62555
This commit is contained in:
parent
bc816461b7
commit
8d9b29bec1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125665
@ -1,3 +1,4 @@
|
||||
/* $FreeBSD$ */
|
||||
/* vi_mode.c -- A vi emulation mode for Bash.
|
||||
Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */
|
||||
|
||||
@ -680,7 +681,8 @@ _rl_vi_change_mbchar_case (count)
|
||||
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 +705,9 @@ _rl_vi_change_mbchar_case (count)
|
||||
/* 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);
|
||||
|
Loading…
Reference in New Issue
Block a user