diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-07-02 15:59:07 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-07-02 15:59:07 +0000 |
commit | 8784bbe97c078f13c91cc220eb0e13c1a92f1655 (patch) | |
tree | 80e1dec23c5dde43e84fbbc1d4f467a0af8f31c7 /Src | |
parent | e9fa0606716419ea85c45667d8c7502bc8eba2c7 (diff) | |
download | zsh-8784bbe97c078f13c91cc220eb0e13c1a92f1655.tar.gz zsh-8784bbe97c078f13c91cc220eb0e13c1a92f1655.tar.xz zsh-8784bbe97c078f13c91cc220eb0e13c1a92f1655.zip |
20126: tidy up before 4.2.1
20127: tweaked version of Wayne's patch to reexand prompts
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_main.c | 10 | ||||
-rw-r--r-- | Src/Zle/zle_refresh.c | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 6f66aa104..3f13c8af3 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -1311,14 +1311,20 @@ recursiveedit(UNUSED(char **args)) } /**/ -int -resetprompt(UNUSED(char **args)) +void +reexpandprompt(void) { free(lpromptbuf); lpromptbuf = promptexpand(raw_lp, 1, NULL, NULL); free(rpromptbuf); rpromptbuf = promptexpand(raw_rp, 1, NULL, NULL); +} +/**/ +int +resetprompt(UNUSED(char **args)) +{ + reexpandprompt(); return redisplay(NULL); } diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 08516939a..c0da11c89 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -291,7 +291,9 @@ zrefresh(void) unsigned char *tmpline; /* line with added pre/post text */ int tmpcs, tmpll; /* ditto cursor position and line length */ int tmpalloced; /* flag to free tmpline when finished */ - + + if (trashedzle) + reexpandprompt(); /* If this is called from listmatches() (indirectly via trashzle()), and * * that was called from the end of zrefresh(), then we don't need to do * |