diff options
author | dana <dana@dana.is> | 2017-12-24 16:21:06 -0600 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2018-01-04 17:16:18 +0000 |
commit | 1af28cbfd740c719a9338c8c9d6b7f55bb3ab13a (patch) | |
tree | b9c2978339f97e7cf41c05f97bf95b553aaf5d4a /Src/Zle/complist.c | |
parent | c2cc8b0fbefc9868fa83537f5b6d90fc1ec438dd (diff) | |
download | zsh-1af28cbfd740c719a9338c8c9d6b7f55bb3ab13a.tar.gz zsh-1af28cbfd740c719a9338c8c9d6b7f55bb3ab13a.tar.xz zsh-1af28cbfd740c719a9338c8c9d6b7f55bb3ab13a.zip |
42164: fix digits in format escapes in completion listings
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r-- | Src/Zle/complist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index a83daeff9..e768aee5d 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -1097,6 +1097,9 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop) if (*p) { int arg = 0, is_fg; + if (idigit(*p)) + arg = zstrtol(p, &p, 10); + len = MB_METACHARLENCONV(p, &cchar); #ifdef MULTIBYTE_SUPPORT if (cchar == WEOF) @@ -1104,9 +1107,6 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop) #endif p += len; - if (idigit(*p)) - arg = zstrtol(p, &p, 10); - m = 0; switch (cchar) { case ZWC('%'): |