zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: yet another undesired 3.1.5-pws-15 change
Date: Sun, 25 Apr 1999 15:44:17 +0200	[thread overview]
Message-ID: <9904251344.AA35300@ibmth.df.unipi.it> (raw)
In-Reply-To: "Timothy J Luoma"'s message of "Fri, 23 Apr 1999 23:11:06 DFT." <199904240311.XAA00619@ocalhost>

Timothy J Luoma wrote:
> There's still a problem with my PROMPT:
> 
> PROMPT='
> ---------------------------------------- %t/%T  
> ----------------------------------------
> %S[OLDPWD: $OLDPWD]
>    [PWD: %~]%s
> %B%n$LOCAL_HOST%b $REMOTE_HOST
> '
> 
> it produces an extra blank line at the end (unlike 3.1.4)

I didn't dare fix this when I originally spotted it, but I think the answer
is the following.  It doesn't have any immediately obvious ill effects.

--- Src/Zle/zle_refresh.c.pw	Mon Apr 19 09:59:35 1999
+++ Src/Zle/zle_refresh.c	Sun Apr 25 15:30:02 1999
@@ -327,7 +327,7 @@
             vcs = 0;
         else if (!clearflag && lpromptbuf[0]) {
             zputs(lpromptbuf, shout);
-	    if (lpromptw == 0)
+	    if (lpromptw == 0 && lprompth == 1)
 		zputs("\n", shout);	/* works with both hasam and !hasam */
 	}
 	if (clearflag) {
@@ -947,7 +947,7 @@
 		zputc('\r', shout);
 	    tc_upcurs(lprompth - 1);
 	    zputs(lpromptbuf, shout);
-	    if (lpromptw == 0)
+	    if (lpromptw == 0 && lprompth == 1)
 		zputs("\n", shout);	/* works with both hasam and !hasam */
 	}
 	i = lpromptw;

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


  reply	other threads:[~1999-04-25 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-23 10:59 Sven Wischnowsky
1999-04-24  3:11 ` Timothy J Luoma
1999-04-25 13:44   ` Peter Stephenson [this message]
1999-04-25 14:35     ` Geoff Wing
1999-04-25 15:22       ` PATCH: 3.1.5-pws-15: multiline prompt Geoff Wing
     [not found]   ` <990423234917.ZM30140@candle.brasslantern.com>
     [not found]     ` <199904241324.JAA23300@ocalhost>
     [not found]       ` <990424092703.ZM32177@candle.brasslantern.com>
     [not found]         ` <199904302157.RAA26524@ocalhost>
     [not found]           ` <990504100735.ZM28408@candle.brasslantern.com>
1999-05-11  2:40             ` success (mostly) pws 17 under NeXTStep 3.3 Timothy J Luoma
1999-05-11  8:06               ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
1999-04-23 10:14 yet another undesired 3.1.5-pws-15 change Timothy J Luoma
1999-04-28 18:13 ` Wayne Davison
1999-04-30 23:24   ` Timothy J Luoma

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=9904251344.AA35300@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).