Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] fix recursive ZLE from completion call



No need for extra checks, we know for sure we are inside of completion.

Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.74
diff -u -p -r1.74 compcore.c
--- Src/Zle/compcore.c  16 Aug 2005 01:59:43 -0000      1.74
+++ Src/Zle/compcore.c  16 Aug 2005 17:08:26 -0000
@@ -355,15 +355,9 @@ do_completion(UNUSED(Hookdef dummy), Com
        minfo.cur = NULL;
        if (useline < 0) {
            /* unmetafy line before calling ZLE */
-           int remetafy = 0;
-
-           if (zlemetaline != NULL) {
-               unmetafy_line();
-               remetafy = 1;
-           }
+           unmetafy_line();
            ret = selfinsert(zlenoargs);
-           if (remetafy)
-               metafy_line();
+           metafy_line();
        }
        goto compend;
     }
@@ -379,15 +373,9 @@ do_completion(UNUSED(Hookdef dummy), Com
        ret = !nmatches;
     } else if (useline < 0) {
        /* unmetafy line before calling ZLE */
-       int remetafy = 0;
-
-       if (zlemetaline != NULL) {
-           unmetafy_line();
-           remetafy = 1;
-       }
+       unmetafy_line();
        ret = selfinsert(zlenoargs);
-       if (remetafy)
-           metafy_line();
+       metafy_line();
     } else if (!useline && uselist) {
        /* All this and the guy only wants to see the list, sigh. */
        zlemetacs = 0;

Attachment: pgp6yVqdrlC7U.pgp
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author