lineedit: fix completion with Unicode chars
function old new delta read_line_input 4966 5002 +36 bb_wcstombs 170 159 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 36/-11) Total: 25 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
b068bd7a41
commit
61a36af45d
2 changed files with 14 additions and 4 deletions
|
@ -131,7 +131,7 @@ size_t FAST_FUNC wcstombs(char *dest, const wchar_t *src, size_t n)
|
|||
size_t len = wcrtomb_internal(tbuf, wc);
|
||||
|
||||
if (len > n)
|
||||
len = n;
|
||||
break;
|
||||
memcpy(dest, tbuf, len);
|
||||
if (wc == L'\0')
|
||||
return org_n - n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue