diff options
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r-- | Src/Zle/zle_thingy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index 494e1ade5..5885fb10f 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -407,7 +407,7 @@ bin_zle_list(UNUSED(char *name), char **args, Options ops, UNUSED(char func)) static int bin_zle_refresh(UNUSED(char *name), char **args, Options ops, UNUSED(char func)) { - char *s = statusline; + ZLE_STRING_T s = statusline; int sl = statusll, ocl = clearlist; if (!zleactive) @@ -416,8 +416,8 @@ bin_zle_refresh(UNUSED(char *name), char **args, Options ops, UNUSED(char func)) statusll = 0; if (*args) { if (**args) { - statusline = *args; - statusll = strlen(statusline); + statusline = stringaszleline((unsigned char *)*args, &statusll, + NULL); } if (*++args) { LinkList l = newlinklist(); @@ -442,6 +442,9 @@ bin_zle_refresh(UNUSED(char *name), char **args, Options ops, UNUSED(char func)) } zrefresh(); + if (statusline) + free(statusline); + clearlist = ocl; statusline = s; statusll = sl; |