about summary refs log tree commit diff
path: root/Src/Zle/complist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-20 21:17:29 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-20 21:17:29 +0000
commitb8ec06c870ac09d5949907640dca4c1a2b711ed5 (patch)
treef5676d7f945f34fe69e30e67fa7fbc8a82730b94 /Src/Zle/complist.c
parenta12b1f35aaeff5724c1d7b4824de62cb4e480698 (diff)
downloadzsh-b8ec06c870ac09d5949907640dca4c1a2b711ed5.tar.gz
zsh-b8ec06c870ac09d5949907640dca4c1a2b711ed5.tar.xz
zsh-b8ec06c870ac09d5949907640dca4c1a2b711ed5.zip
24853: use metafied strings for inner loops over history
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r--Src/Zle/complist.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index f441ae530..651a5103c 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2432,7 +2432,7 @@ domenuselect(Hookdef dummy, Chdata dat)
         }
         first = 0;
         if (mode == MM_INTER)
-	    statusline = stringaszleline(status, 0, &statusll, NULL, NULL);
+	    statusline = status;
         else if (mode) {
             int l = sprintf(status, "%s%sisearch%s: ",
                             ((msearchstate & MS_FAILED) ? "failed " : ""),
@@ -2441,17 +2441,12 @@ domenuselect(Hookdef dummy, Chdata dat)
 
             strncat(status, msearchstr, MAX_STATUS - l - 1);
 
-            statusline = stringaszleline(status, 0, &statusll, NULL, NULL);
+            statusline = status;
         } else {
             statusline = NULL;
-            statusll = 0;
         }
         zrefresh();
-	if (statusline) {
-	    free(statusline);
-	    statusline = NULL;
-	    statusll = 0;
-	}
+	statusline = NULL;
         inselect = 1;
         if (noselect) {
             broken = 1;
@@ -2622,12 +2617,10 @@ domenuselect(Hookdef dummy, Chdata dat)
 	    if (nmatches < 1 || !minfo.cur || !*(minfo.cur)) {
 		nolist = 1;
                 if (mode == MM_INTER) {
-                    statusline = stringaszleline(status, 0,
-						 &statusll, NULL, NULL);
+                    statusline = status;
                 } else {
 		    /* paranoia */
 		    statusline = NULL;
-		    statusll = 0;
 		}
 		if (nmessages) {
 		    showinglist = -2;
@@ -2645,11 +2638,7 @@ domenuselect(Hookdef dummy, Chdata dat)
 		    zrefresh();
 		    showinglist = clearlist = 0;
 		}
-		if (statusline) {
-		    free(statusline);
-		    statusline = NULL;
-		    statusll = 0;
-		}
+		statusline = NULL;
 
 		goto getk;
 	    }
@@ -2763,19 +2752,13 @@ domenuselect(Hookdef dummy, Chdata dat)
 
             if (nolist) {
                 if (mode == MM_INTER) {
-                    statusline = stringaszleline(status, 0,
-						 &statusll, NULL, NULL);
+                    statusline = status;
                 } else {
 		    /* paranoia */
 		    statusline = NULL;
-		    statusll = 0;
 		}
                 zrefresh();
-		if (statusline) {
-		    free(statusline);
-		    statusline = NULL;
-		    statusll = 0;
-		}
+		statusline = NULL;
                 goto getk;
             }
             if (mode)