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

Re: Fun with zsh (Re: Associative array ordering (Re: Example function))



Bart Schaefer wrote:

> On Feb 2,  6:19pm, Sven Wischnowsky wrote:
> } Subject: Re: Fun with zsh (Re: Associative array ordering (Re: Example fun
> }
> } > BTW, while fooling with this, I discovered that autolist output is not
> } > properly cleared when M-x is the next thing typed (execute-named-cmd).
> } 
> } Hm. With `execute-named-cmd' I see the list being pushed one line down 
> } and the prompt appearing above it. But with C-r and C-s I see the list
> } being partly overwritten by the prompt.
> 
> That's right, but I think they should all just erase the listing entirely.

I came to the same conclusion yesterday evening, so here is the patch.

Bye
 Sven

P.S.: Is there really no easier way to remove the list without messing 
      up the cursor position?

diff -u os/Zle/zle_hist.c Src/Zle/zle_hist.c
--- os/Zle/zle_hist.c	Mon Feb  1 10:54:26 1999
+++ Src/Zle/zle_hist.c	Wed Feb  3 11:38:27 1999
@@ -663,6 +663,11 @@
     static char *previous_search = NULL;
     static int previous_search_len = 0;
 
+    invalidatelist();
+    moveto(0, 0);
+    clearflag = 0;
+    resetneeded = 1; 
+
     strcpy(ibuf, ISEARCH_PROMPT);
     memcpy(ibuf + NORM_PROMPT_POS, (dir == 1) ? "fwd" : "bck", 3);
     remember_edits();
@@ -943,6 +948,10 @@
 	zsfree(visrchstr);
 	visrchstr = NULL;
     }
+    invalidatelist();
+    moveto(0, 0);
+    clearflag = 0;
+    resetneeded = 1; 
     statusline = sbuf;
     sbuf[0] = (visrchsense == -1) ? '?' : '/';
     selectkeymap("main", 1);
diff -u os/Zle/zle_main.c Src/Zle/zle_main.c
--- os/Zle/zle_main.c	Mon Feb  1 10:54:26 1999
+++ Src/Zle/zle_main.c	Wed Feb  3 11:38:41 1999
@@ -792,6 +792,10 @@
 
     if (statusline)
 	return;
+    invalidatelist();
+    moveto(0, 0);
+    clearflag = 0;
+    resetneeded = 1; 
     statusline = "Describe key briefly: _";
     statusll = strlen(statusline);
     zrefresh();
diff -u os/Zle/zle_misc.c Src/Zle/zle_misc.c
--- os/Zle/zle_misc.c	Mon Feb  1 10:54:27 1999
+++ Src/Zle/zle_misc.c	Wed Feb  3 11:38:34 1999
@@ -612,6 +612,10 @@
     char *ptr;
     char *okeymap = curkeymapname;
 
+    invalidatelist();
+    moveto(0, 0);
+    clearflag = 0;
+    resetneeded = 1; 
     cmdbuf = halloc(l + NAMLEN + 2);
     strcpy(cmdbuf, prmt);
     statusline = cmdbuf;
diff -u os/Zle/zle_vi.c Src/Zle/zle_vi.c
--- os/Zle/zle_vi.c	Mon Feb  1 10:54:28 1999
+++ Src/Zle/zle_vi.c	Wed Feb  3 11:38:00 1999
@@ -816,6 +816,10 @@
 void
 vicapslockpanic(void)
 {
+    invalidatelist();
+    moveto(0, 0);
+    clearflag = 0;
+    resetneeded = 1; 
     zbeep();
     statusline = "press a lowercase key to continue";
     statusll = strlen(statusline);


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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