zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH for 3.0.6 (was: Re: compctl question)
Date: Mon, 10 May 1999 13:26:08 +0200 (MET DST)	[thread overview]
Message-ID: <199905101126.NAA15286@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Mon, 10 May 1999 13:15:52 +0200 (MET DST)


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


                 reply	other threads:[~1999-05-10 11:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199905101126.NAA15286@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).