From 1af28cbfd740c719a9338c8c9d6b7f55bb3ab13a Mon Sep 17 00:00:00 2001 From: dana Date: Sun, 24 Dec 2017 16:21:06 -0600 Subject: 42164: fix digits in format escapes in completion listings --- Src/Zle/complist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src') 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('%'): -- cgit 1.4.1