From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id UAA04649 for ; Tue, 10 Sep 1996 20:45:06 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id GAA00264; Tue, 10 Sep 1996 06:28:56 -0400 (EDT) Resent-Date: Tue, 10 Sep 1996 06:28:56 -0400 (EDT) From: Geoff Wing Message-Id: <199609101025.UAA04474@coral.primenet.com.au> Subject: Re: bugs found To: zsh-workers@math.gatech.edu Date: Tue, 10 Sep 1996 20:25:09 +1000 (EST) Cc: hoh@approve.se (Goran Larsson) In-Reply-To: from "mason" at Sep 4, 96 04:54:20 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"IQenq1.0.-3.dBKDo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2118 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I wrote: ::From: hoh@approve.se (Goran Larsson) ::2) :: $ PROMPT=AAA :: AAA_ :: AAAPROMPT=AA :: AA_ :: AAPROMPT=A :: _ :: APROMPT='$' :: APROMPT='$ ' :: $ _ :: Note that any one character prompt is replaced by a space. :OK. I've found the problem (and another smaller one - the code gets to a :place I commented as 'shouldn't happen' - now I've got to remember why :-)). I am still not totally sure why I had it commented as `shouldn't happen'. Most likely it would have had to do with cleareol stuff and it may be redundant, but since it may not I've left it in. :Patch in a day or so. Or a bit longer. *** zle_refresh.c.old Wed Sep 4 02:12:23 1996 --- zle_refresh.c Tue Sep 10 20:17:00 1996 *************** *** 515,521 **** if (ln && nbuf[ln]) strncpy(nl, p1, winw + 1); /* next time obuf will be up-to-date */ else ! nl = p1; /* shouldn't happen */ nllen = winw; } else if (ollen > nllen) { /* make new line at least as long as old */ p1 = halloc(ollen + 1); --- 515,521 ---- if (ln && nbuf[ln]) strncpy(nl, p1, winw + 1); /* next time obuf will be up-to-date */ else ! nl = p1; /* don't keep padding for prompt line */ nllen = winw; } else if (ollen > nllen) { /* make new line at least as long as old */ p1 = halloc(ollen + 1); *************** *** 553,558 **** --- 553,567 ---- if (*ol) ol++; ccs = 1; + } + + /* 2c: if we're on the first line, start checking at the end of the prompt; + we shouldn't be doing anything within the prompt */ + + if (ln == 0 && pptw) { + nl += (pptw - ccs); + ol += (pptw - ccs); + ccs = pptw; } /* 3: main display loop - write out the buffer using whatever tricks we can */ -- Geoff Wing [mason@primenet.com.au] PrimeNet - Internet Consultancy Web: http://www.primenet.com.au/ Facsimile: +61-3-9819 3788