about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2017-04-23 23:58:44 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2017-04-23 23:58:44 +0900
commit3c78f14d5cfe98cb567cced9cfe283cb890155ef (patch)
tree7c5350125ec62cdd29fb4e98b48432410d0a2ad6 /Src
parenta2e2f5668deeca554a429b6557a169ed25808f1c (diff)
downloadzsh-3c78f14d5cfe98cb567cced9cfe283cb890155ef.tar.gz
zsh-3c78f14d5cfe98cb567cced9cfe283cb890155ef.tar.xz
zsh-3c78f14d5cfe98cb567cced9cfe283cb890155ef.zip
40994: unmeta_one() need not count Meta
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 9701ea78a..ea4b34bab 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -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;