diff options
author | Andrey Borzenkov <bor@users.sourceforge.net> | 2005-08-15 18:16:04 +0000 |
---|---|---|
committer | Andrey Borzenkov <bor@users.sourceforge.net> | 2005-08-15 18:16:04 +0000 |
commit | 17e1a3cd0c0b1856dc95563a9b37e8eb49cd28d8 (patch) | |
tree | 433849e13aed5465386cadbf9d7f46e6d9a8e065 /Src/Zle | |
parent | f570dd59e3fba17f060350ce117d29b8afb2c181 (diff) | |
download | zsh-17e1a3cd0c0b1856dc95563a9b37e8eb49cd28d8.tar.gz zsh-17e1a3cd0c0b1856dc95563a9b37e8eb49cd28d8.tar.xz zsh-17e1a3cd0c0b1856dc95563a9b37e8eb49cd28d8.zip |
21627: fix recursive ZLE from completion call
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compcore.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index df43cc1ac..3a86eb793 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -353,8 +353,18 @@ do_completion(UNUSED(Hookdef dummy), Compldat dat) clearlist = 1; ret = 1; minfo.cur = NULL; - if (useline < 0) + if (useline < 0) { + /* unmetafy line before calling ZLE */ + int remetafy = 0; + + if (zlemetaline != NULL) { + unmetafy_line(); + remetafy = 1; + } ret = selfinsert(zlenoargs); + if (remetafy) + metafy_line(); + } goto compend; } zsfree(lastprebr); @@ -367,9 +377,18 @@ do_completion(UNUSED(Hookdef dummy), Compldat dat) if (nmatches) do_ambig_menu(); ret = !nmatches; - } else if (useline < 0) + } else if (useline < 0) { + /* unmetafy line before calling ZLE */ + int remetafy = 0; + + if (zlemetaline != NULL) { + unmetafy_line(); + remetafy = 1; + } ret = selfinsert(zlenoargs); - else if (!useline && uselist) { + if (remetafy) + metafy_line(); + } else if (!useline && uselist) { /* All this and the guy only wants to see the list, sigh. */ zlemetacs = 0; foredel(zlemetall); |