From: Arun Prakash Jana Date: Sun, 17 Nov 2019 00:06:39 +0000 (+0530) Subject: Clear prompt after running a command. X-Git-Tag: v2.8~79 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=05c84f7b80872062eaf15bdfbb45e43161bd7eeb;p=nnn.git Clear prompt after running a command. --- diff --git a/src/nnn.c b/src/nnn.c index 5c9ad719..7ee23add 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1976,6 +1976,16 @@ static int filterentries(char *path) /* If there's a filter, try a command on ^P */ if (cfg.filtercmd && *ch == CONTROL('P') && len > 1) { prompt_run(pln, (ndents ? dents[cur].name : ""), path); + + /* Clear the prompt */ + while (len > 1) + wln[--len] = '\0'; + wcstombs(ln, wln, REGEX_MAX); + ndents = total; + if (matches(pln) != -1) + redraw(path); + + printprompt(ln); continue; }