diff options
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r-- | Src/Zle/complist.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index f441ae530..651a5103c 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -2432,7 +2432,7 @@ domenuselect(Hookdef dummy, Chdata dat) } first = 0; if (mode == MM_INTER) - statusline = stringaszleline(status, 0, &statusll, NULL, NULL); + statusline = status; else if (mode) { int l = sprintf(status, "%s%sisearch%s: ", ((msearchstate & MS_FAILED) ? "failed " : ""), @@ -2441,17 +2441,12 @@ domenuselect(Hookdef dummy, Chdata dat) strncat(status, msearchstr, MAX_STATUS - l - 1); - statusline = stringaszleline(status, 0, &statusll, NULL, NULL); + statusline = status; } else { statusline = NULL; - statusll = 0; } zrefresh(); - if (statusline) { - free(statusline); - statusline = NULL; - statusll = 0; - } + statusline = NULL; inselect = 1; if (noselect) { broken = 1; @@ -2622,12 +2617,10 @@ domenuselect(Hookdef dummy, Chdata dat) if (nmatches < 1 || !minfo.cur || !*(minfo.cur)) { nolist = 1; if (mode == MM_INTER) { - statusline = stringaszleline(status, 0, - &statusll, NULL, NULL); + statusline = status; } else { /* paranoia */ statusline = NULL; - statusll = 0; } if (nmessages) { showinglist = -2; @@ -2645,11 +2638,7 @@ domenuselect(Hookdef dummy, Chdata dat) zrefresh(); showinglist = clearlist = 0; } - if (statusline) { - free(statusline); - statusline = NULL; - statusll = 0; - } + statusline = NULL; goto getk; } @@ -2763,19 +2752,13 @@ domenuselect(Hookdef dummy, Chdata dat) if (nolist) { if (mode == MM_INTER) { - statusline = stringaszleline(status, 0, - &statusll, NULL, NULL); + statusline = status; } else { /* paranoia */ statusline = NULL; - statusll = 0; } zrefresh(); - if (statusline) { - free(statusline); - statusline = NULL; - statusll = 0; - } + statusline = NULL; goto getk; } if (mode) |