Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH for 3.0.6 (was: Re: compctl question)
- X-seq: zsh-workers 6247
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH for 3.0.6 (was: Re: compctl question)
- Date: Mon, 10 May 1999 13:26:08 +0200 (MET DST)
- In-reply-to: Sven Wischnowsky's message of Mon, 10 May 1999 13:15:52 +0200 (MET DST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author