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

Re: PATCH: fix the word boundary stuff



"Mikael Magnusson" wrote:
> This patch broke _backward-delete-to-/ for me. It was posted here some
> time back, here's the file I use: http://mika.l3ib.org/s/dot-delete-to
> 
> Without the patch, on the commandline
> foo bar/baz\ blarg
> when i press ctrl-w i first get "foo bar/" and then "foo ", with the
> patch i get "foo bar/baz\", "foo bar" and "foo".

That's likely to be this.  I scanned for similar problems but didn't see
any.

Index: Src/Zle/zle_word.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_word.c,v
retrieving revision 1.11
diff -u -r1.11 zle_word.c
--- Src/Zle/zle_word.c	17 Apr 2008 12:52:17 -0000	1.11
+++ Src/Zle/zle_word.c	18 Apr 2008 11:30:08 -0000
@@ -464,14 +464,14 @@
 	while (x) {
 	    int pos = x;
 	    DECPOS(pos);
-	    if (ZC_iword(zleline[x]))
+	    if (ZC_iword(zleline[pos]))
 		break;
 	    x = pos;
 	}
 	while (x) {
 	    int pos = x;
 	    DECPOS(pos);
-	    if (!ZC_iword(zleline[x]))
+	    if (!ZC_iword(zleline[pos]))
 		break;
 	    x = pos;
 	}

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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