From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10264 invoked from network); 10 May 1999 11:26:34 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 May 1999 11:26:34 -0000 Received: (qmail 13452 invoked by alias); 10 May 1999 11:26:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6247 Received: (qmail 13445 invoked from network); 10 May 1999 11:26:10 -0000 Date: Mon, 10 May 1999 13:26:08 +0200 (MET DST) Message-Id: <199905101126.NAA15286@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Mon, 10 May 1999 13:15:52 +0200 (MET DST) Subject: PATCH for 3.0.6 (was: Re: compctl question) I wrote: > foo() { reply=( ~/mail/${1[2,-1]}*${2}(N:t) ); reply=( \\\=$^reply ); } > compctl -x 'S[=],S[\\=]' -UQK foo -- bar Those who have tried this with 3.0.6 will have noticed a display bug: in listmatches() trashzle() gets called with the line prepared for completion. If there are characters that need quoting, ll will be different from the real line length. The patch below is a *very* simple(-minded) attempt to fix that. But due to its simplicity it should be very robust. Bye Sven --- Src/zle_tricky.c.old Mon May 10 13:21:55 1999 +++ Src/zle_tricky.c Mon May 10 13:22:03 1999 @@ -3543,6 +3543,7 @@ !(haswhat & (HAS_MISC | HAS_PATHPAT)) ? niceztrlen(psuf) : 0; /* Set the cursor below the prompt. */ + ll = strlen(line); trashzle(); ct = nmatches; showinglist = listshown = 0; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de