From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22039 invoked from network); 3 Oct 1999 09:04:37 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Oct 1999 09:04:37 -0000 Received: (qmail 24881 invoked by alias); 3 Oct 1999 09:04:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8126 Received: (qmail 24874 invoked from network); 3 Oct 1999 09:04:30 -0000 To: zsh-workers@sunsite.auc.dk Path: mason From: mason@primenet.com.au (Geoff Wing) X-Newsgroups: lists.zsh.workers Subject: PATCH: 3.1.6* (Was: Weird behaviour with certain PS1-sequences) Date: 3 Oct 1999 09:04:26 GMT Organization: PrimeNet Computer Consultants Distribution: local Message-ID: References: "Dan Nelson"'s message of "Mon, 27 Sep 1999 17:06:47 DFT." <9909280854.AA28230@ibmth.df.unipi.it> Reply-To: mason@primenet.com.au NNTP-Posting-Host: coral.primenet.com.au X-Trace: coral.primenet.com.au 938941466 22021 203.43.15.2 (3 Oct 1999 09:04:26 GMT) X-Complaints-To: usenet@coral.primenet.com.au NNTP-Posting-Date: 3 Oct 1999 09:04:26 GMT User-Agent: slrn/0.9.5.7 (UNIX) Peter Stephenson typed: :Dan Nelson wrote: :> % zsh -f :> % PROMPT="%m %n %/ %%" :> dan dan /home/dan % TERM=dumb :> dan dan /home/dan % :> ^ blanks start here and don't stop : :Yes, I can see this, and what's going wrong, in the refresh code. :Unfortunately I'm not sure I understand the logic well enough to fix it, :though if Geoff doesn't get around to it I will have to try. : :The spaces in the prompt match what is on the line already at that point, :i.e. nothing. singmoveto() is called to skip over them, one by one. :(Since we're skipping only one character in this example, it would :presumably be more efficient just to output it, but that's a different :question.) The problem is that if we're in singlerefresh() mode then we don't use the normal prompt anyway. Since we're using a different prompt we can't do prompt writing in tc_rightcurs(). --- Src/Zle/zle_refresh.c.org Thu Jul 15 18:27:59 1999 +++ Src/Zle/zle_refresh.c Sun Oct 3 18:48:00 1999 @@ -945,7 +945,7 @@ /* otherwise _carefully_ write the contents of the video buffer. if we're anywhere in the prompt, goto the left column and write the whole prompt out unless ztrlen(lpromptbuf) == lpromptw : we can cheat then */ - if (vln == 0 && i < lpromptw) { + if (vln == 0 && i < lpromptw && !(termflags & TERM_SHORT)) { if (strlen(lpromptbuf) == lpromptw) fputs(lpromptbuf + i, shout); else if (tccan(TCRIGHT) && (tclen[TCRIGHT] * ct <= ztrlen(lpromptbuf))) -- Geoff Wing : Work URL: http://www.primenet.com.au/ Rxvt Stuff : Ego URL : http://pobox.com/~gcw/ Zsh Stuff : Phone : (Australia) 0413 431 874