Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _describe and literal \n
- X-seq: zsh-workers 39501
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _describe and literal \n
- Date: Thu, 29 Sep 2016 14:28:15 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=5z34wi/mGRHtC5Wn5Mw1xmRSt7E=; b=RYgzgZ i7EUVD5FWjDFTY8vmI+Ky5x1zW0B+crxDAK/YNL+CPfHMK2jxQSNlhbc13EL82SO u65ZQrPhbpCPIYKFRM/hQ+9oPFjrSZaVafGBs+6ol1Z3WSB41t5/c1N3CxCQDMk6 etUhC6HT5TK5pA99NaLbg0Thm1TKW5JsqBUL4=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=5z34wi/mGRHtC5Wn5Mw1xmRSt7E=; b=iduZB 3WWh4f18jLdqre6Y+AwlNaj9CNGzrJbFHrwTMzwDwV4pVcBwH+inYYtsbgALZxZB yO9iBA/QoYmWabx9cORHqwNZZwBKB1Bc1yTaaFa4TCE9MmEYC8KQ9qIRRyxLQq9g 45kr5G8iW4Ew0AFll41sLxJBLivcTQxfFcEhMA=
- In-reply-to: <20160929141139.GA5059@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160723180430.GA22451@tarsus.local2> <160723130059.ZM19333@torch.brasslantern.com> <20160723212345.GA2982@tarsus.local2> <5530.1469316428@hydra.kiddle.eu> <20160724213046.GB27932@tarsus.local2> <92023.1475008338@hydra.kiddle.eu> <20160929141139.GA5059@fujitsu.shahaf.local2>
Daniel Shahaf wrote on Thu, Sep 29, 2016 at 14:11:39 +0000:
> Using 'nice' widths in compdescribe fixes the case from 38928, but not
> the one from 38925. I think that one simply needs a s/zputs/nicezputs/
> somewhere in the "not part of a group" codepath.
The following appears to be the missing 'nice'. On the 38925 case, it
causes the newlines to be output as \n (two characters) rather than
dumpd to stdout literally, but it messes up the cursor position:
pressing <TAB> redraws the prompt two lines above where it started.
Daniel
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 7fec7c8..0e09e1b 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -2236,7 +2236,7 @@ iprintm(Cmgroup g, Cmatch *mp, UNUSED(int mc), UNUSED(int ml), int lastc, int wi
bld_all_str(m);
if (m->disp) {
if (m->flags & CMF_DISPLINE) {
- printfmt(m->disp, 0, 1, 0);
+ printfmt(nicedupstring(m->disp), 0, 1, 0);
return;
}
#ifdef MULTIBYTE_SUPPORT
Messages sorted by:
Reverse Date,
Date,
Thread,
Author