Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "off by one fix in multiple prompts" breaks multiline prompt
- X-seq: zsh-workers 43285
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Guillaume Chazarain <guichaz@xxxxxxxxx>, <zsh-workers@xxxxxxx>
- Subject: Re: "off by one fix in multiple prompts" breaks multiline prompt
- Date: Mon, 13 Aug 2018 13:58:09 +0100
- Cc: <warepire.ml@xxxxxxxxx>
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180813125812euoutp029156fb3fd4cfe3f30d66cebdb62b8b35~KcwXlKZRW2239822398euoutp02D
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1534165092; bh=Ki5ejZIGJDxMidUVQ3tbZRH91rL6vO9Xjj8/1zinhf8=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=gxGJYGvUoSL9rplI/I1/adF6gdZMUNe7LUvl7iI2PB8GdxMiVwgQrd5G/XPSHZlhy qz2lI6uoMAj7aB27/jae0BjRUbh/SzQ9Bqx6HWYlatzu+URtmx+r5zyB8Ktr0T2weG aDFV38SV3kETsMgGstGu80XCHyAksN8Srg1iRy9Q=
- In-reply-to: <CAA879TOk3wqsY96dipo=gvFeN0OXTC0ei9i0xRsSyYyVmFG2rg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CGME20180810072702epcas5p4ecaa5cffa5dc7668e2b2aa3a30824f36@epcas5p4.samsung.com> <CAA879TMRSWDSkqHP206-JLaJ8F4U=18DYU1CpCwCQ4iWMu_4Tg@mail.gmail.com> <20180813084255eucas1p102bc21872ad72a2cd049d8d9db2f0e86~KZResIryo0309103091eucas1p10@eucas1p1.samsung.com> <CAA879TPfqJbR1vwYfbRTCWoqkC-iH7pXHSwGYUzqOj8CT95xPg@mail.gmail.com> <20180813113640eucas1p19d52c9c05089626f375a00c5115aef32~KbpML4Mzp0510505105eucas1p1P@eucas1p1.samsung.com> <CAA879TOk3wqsY96dipo=gvFeN0OXTC0ei9i0xRsSyYyVmFG2rg@mail.gmail.com>
On Mon, 13 Aug 2018 13:42:50 +0200
Guillaume Chazarain <guichaz@xxxxxxxxx> wrote:
> On Mon, Aug 13, 2018 at 1:36 PM Peter Stephenson
> <p.stephenson@xxxxxxxxxxx> 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++;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author