That is becoming ridiculous. Any chance to have single entry point (wrapper?)
for ZLE and completion functions?
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.71
diff -u -p -r1.71 compcore.c
--- Src/Zle/compcore.c 10 Aug 2005 10:56:41 -0000 1.71
+++ Src/Zle/compcore.c 15 Aug 2005 18:04:45 -0000
@@ -353,8 +353,18 @@ do_completion(UNUSED(Hookdef dummy), Com
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), Com
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);
Attachment:
pgpG4PWQuOA3R.pgp
Description: PGP signature