mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-07-22 08:21:02 +02:00
40994: unmeta_one() need not count Meta
This commit is contained in:
parent
a2e2f5668d
commit
3c78f14d5c
2 changed files with 5 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
|||
2017-04-23 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 40994: Src/utils.c: unmeta_one() need not count Meta
|
||||
|
||||
2017-04-21 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 40990: Src/params.c: When starting in sh emulation, don't
|
||||
|
|
|
@ -4797,7 +4797,6 @@ unmeta_one(const char *in, int *sz)
|
|||
convchar_t wc;
|
||||
int newsz;
|
||||
#ifdef MULTIBYTE_SUPPORT
|
||||
int ulen;
|
||||
mbstate_t wstate;
|
||||
#endif
|
||||
|
||||
|
@ -4810,13 +4809,7 @@ unmeta_one(const char *in, int *sz)
|
|||
|
||||
#ifdef MULTIBYTE_SUPPORT
|
||||
memset(&wstate, 0, sizeof(wstate));
|
||||
ulen = mb_metacharlenconv_r(in, &wc, &wstate);
|
||||
while (ulen-- > 0) {
|
||||
if (in[*sz] == Meta)
|
||||
*sz += 2;
|
||||
else
|
||||
*sz += 1;
|
||||
}
|
||||
*sz = mb_metacharlenconv_r(in, &wc, &wstate);
|
||||
#else
|
||||
if (in[0] == Meta) {
|
||||
*sz = 2;
|
||||
|
|
Loading…
Reference in a new issue