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

Re: PATCH: pattern incremental search



Feeping awful, part 2...  I'll just commit any more I find on this
scale without posting.

There might be argument for even less feeping on invalid patterns.  You
do get a prompt, after all, and many complicated patterns go through
this stage.

Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.46
diff -u -r1.46 zle_hist.c
--- Src/Zle/zle_hist.c	26 Apr 2008 20:40:18 -0000	1.46
+++ Src/Zle/zle_hist.c	26 Apr 2008 20:49:30 -0000
@@ -1179,8 +1179,10 @@
 		if (patprog) {
 		    revert_patpos = 1;
 		} else {
-		    handlefeep(zlenoargs);
-		    nomatch = 2;
+		    if (nomatch != 2) {
+			handlefeep(zlenoargs);
+			nomatch = 2;
+		    }
 		    /* indicate "invalid" in status line */
 		    memcpy(ibuf, INVALID_TEXT, BAD_TEXT_LEN);
 		    statusline = ibuf;


-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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