* PATCH for 3.0.6 (was: Re: compctl question)
@ 1999-05-10 11:26 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1999-05-10 11:26 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-05-10 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-10 11:26 PATCH for 3.0.6 (was: Re: compctl question) Sven Wischnowsky
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).