From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29884 invoked by alias); 29 Sep 2016 14:29:38 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39501 Received: (qmail 24080 invoked from network); 29 Sep 2016 14:29:38 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.26):SA:0(0.0/5.0):. Processed in 0.125993 secs); 29 Sep 2016 14:29:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) 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= X-Sasl-enc: EHtpJsMT1vkniNJDhXWq1O05fTSg47kPDfIzZAG3QIO0 1475159374 Date: Thu, 29 Sep 2016 14:28:15 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: [PATCH] _describe and literal \n Message-ID: <20160929142815.GA23133@fujitsu.shahaf.local2> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160929141139.GA5059@fujitsu.shahaf.local2> User-Agent: Mutt/1.5.23 (2014-03-12) 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 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