From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] _describe and literal \n
Date: Thu, 29 Sep 2016 14:28:15 +0000 [thread overview]
Message-ID: <20160929142815.GA23133@fujitsu.shahaf.local2> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2016-09-29 14:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-23 18:04 Daniel Shahaf
2016-07-23 20:00 ` Bart Schaefer
2016-07-23 21:23 ` Daniel Shahaf
2016-07-23 23:27 ` Oliver Kiddle
2016-07-24 1:27 ` Bart Schaefer
2016-07-24 21:30 ` Daniel Shahaf
2016-09-27 20:32 ` Oliver Kiddle
2016-09-29 14:11 ` Daniel Shahaf
2016-09-29 14:28 ` Daniel Shahaf [this message]
2016-10-07 13:50 ` Daniel Shahaf
2016-10-07 14:53 ` Bart Schaefer
2016-10-08 7:42 ` Daniel Shahaf
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=20160929142815.GA23133@fujitsu.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/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).