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

Re: _all_matches moves cursor



(Moved to zsh-workers.)

Peter Stephenson wrote:
> I've read it more carefully and I think there's simply a bug in the
> calculation at this point.

Aaarggh! No there isn't, add is already in t.  The patch simply moved
the end of output too far to the left, avoiding the problem.

I'm fed up with this, but given the propensity to abbreviate in the
middle of the line, I think simply omitting the initial space would do.
Nothing else works for reasons I can't fathom.

Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.66
diff -u -r1.66 compresult.c
--- Src/Zle/compresult.c	6 Oct 2006 10:07:38 -0000	1.66
+++ Src/Zle/compresult.c	6 Oct 2006 16:43:18 -0000
@@ -2126,7 +2126,7 @@
 		if (add)
 		    strcat(buf, " ");
 		strcat(buf, m->str);
-		len -= t + add;
+		len -= t;
 		add = 1;
 	    } else {
 		if (len > add + 2) {
@@ -2134,7 +2134,7 @@
 			strcat(buf, " ");
 		    strncat(buf, m->str, len);
 		}
-		strcat(buf, " ...");
+		strcat(buf, "...");
 		break;
 	    }
 	}

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


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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