zsh-workers
 help / color / mirror / code / Atom feed
* Re: _all_matches moves cursor
       [not found]   ` <200610061003.k96A3RQh019503@news01.csr.com>
@ 2006-10-06 16:46     ` Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2006-10-06 16:46 UTC (permalink / raw)
  To: Zsh hackers list

(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@csr.com>                  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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-06 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20061006051215.GA12364@mollari.zhar.net>
     [not found] ` <200610060941.k969fbIw017806@news01.csr.com>
     [not found]   ` <200610061003.k96A3RQh019503@news01.csr.com>
2006-10-06 16:46     ` _all_matches moves cursor Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).