zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Guillaume Chazarain <guichaz@gmail.com>, <zsh-workers@zsh.org>
Cc: <warepire.ml@gmail.com>
Subject: Re: "off by one fix in multiple prompts" breaks multiline prompt
Date: Mon, 13 Aug 2018 13:58:09 +0100	[thread overview]
Message-ID: <20180813125810eucas1p181a58cb55dc815863d6d81e1cd629d71~KcwV9B7ZD1627716277eucas1p1o@eucas1p1.samsung.com> (raw)
In-Reply-To: <CAA879TOk3wqsY96dipo=gvFeN0OXTC0ei9i0xRsSyYyVmFG2rg@mail.gmail.com>

On Mon, 13 Aug 2018 13:42:50 +0200
Guillaume Chazarain <guichaz@gmail.com> wrote:
> On Mon, Aug 13, 2018 at 1:36 PM Peter Stephenson
> <p.stephenson@samsung.com> wrote:
> 
> > So you're saying the commit you say is causing the problem isn't
> > fixing the problem it was supposed to fix?  That implies something
> > else changed, since dana tried it out at the time and said it
> > worked. 
> 
> Sorry, I was unclear.
> The commit is indeed fixing the problem it was supposed to fix.
> I meant that on all terminals I tested, I saw consistent behaviour:
> the commit fixes the original problem but introduces a new one (mine).
> So it looks like it should be possible to fix both problems.

Thaks for that.

I suspect dana was saying we need something like this?  Has this got
anything to do with it?  (Second guessing other people's fixes is really
hard work...)

pws

diff --git a/Src/prompt.c b/Src/prompt.c
index 959ed8e..758d5f2 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -1170,7 +1170,7 @@ countprompt(char *str, int *wp, int *hp, int overf)
      * This isn't easy to handle generally; just assume there's no
      * output.
      */
-    if(w >= zterm_columns && overf >= 0) {
+    if(w > zterm_columns && overf >= 0) {
 	if (!overf || w > zterm_columns) {
 	    w = 0;
 	    h++;


  reply	other threads:[~2018-08-13 12:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180810072702epcas5p4ecaa5cffa5dc7668e2b2aa3a30824f36@epcas5p4.samsung.com>
2018-08-10  7:26 ` Guillaume Chazarain
2018-08-13  8:42   ` Peter Stephenson
2018-08-13 11:22     ` Guillaume Chazarain
2018-08-13 11:36       ` Peter Stephenson
2018-08-13 11:42         ` Guillaume Chazarain
2018-08-13 12:58           ` Peter Stephenson [this message]
2018-08-13 14:19             ` dana
2018-08-13 18:34               ` Guillaume Chazarain
2018-08-13 21:29               ` dana
2018-08-13 21:45                 ` Bart Schaefer
2018-08-13 22:44                   ` dana
2018-08-14  8:30                     ` Peter Stephenson
2018-08-14  6:41                 ` Guillaume Chazarain
     [not found]       ` <20180813123639.5899f64e@camnpupstephen.cam.scsc.local>
2018-08-13 11:40         ` Peter Stephenson

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='20180813125810eucas1p181a58cb55dc815863d6d81e1cd629d71~KcwV9B7ZD1627716277eucas1p1o@eucas1p1.samsung.com' \
    --to=p.stephenson@samsung.com \
    --cc=guichaz@gmail.com \
    --cc=warepire.ml@gmail.com \
    --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).