From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id SAA20587 for ; Tue, 25 Jul 1995 18:17:47 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA25869 (5.65c/Gatech-10.0-IDA); Tue, 25 Jul 1995 03:58:23 -0400 Received: by math (5.x/SMI-SVR4) id AA16689; Tue, 25 Jul 1995 03:54:04 -0400 Resent-Date: Tue, 25 Jul 1995 17:55:06 +1000 (EST) Old-Return-Path: From: Geoff Wing Message-Id: <199507250755.RAA13784@werple03.mira.net.au> Subject: zle_refresh.c bug fix To: zsh-workers@math.gatech.edu (zsh-list) Date: Tue, 25 Jul 1995 17:55:06 +1000 (EST) X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"Axy4P3.0.h44.RCA5m"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/273 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Heyla, as Wayne Davison pointed out in message 252, I made an error in my patch in message 164. The patch below will fix it. I must have been thinking of some possible exception when I wrote it, but when I looked at it before, there didn't seem to be any such. Strange things must be happening with my mind's logic processes. Anyway, it's a unidiff to base + my patch (in 164) only (I think). --- zle_refresh.c.~1~ Fri Jul 7 12:32:32 1995 +++ zle_refresh.c Tue Jul 25 17:28:16 1995 @@ -470,15 +470,14 @@ for (;;) { /* skip past all matching characters */ for (; *nl && (*nl == *ol); nl++, ol++, ccs++) ; if (!*nl) { - if ((char_ins <= 0) || (vcs >= winw)) /* written everything */ + if ((char_ins <= 0) || (ccs >= winw)) /* written everything */ return; else /* we've got junk on the right yet to clear */ - if (tccan(TCCLEAREOL) && (char_ins >= tclen[TCCLEAREOL]) - && ccs < winw) + if (tccan(TCCLEAREOL) && (char_ins >= tclen[TCCLEAREOL])) col_cleareol = 0; /* force a clear to end of line */ } moveto(ln, ccs); /* move to where we do all output from */ @@ -489,16 +488,15 @@ return; } /* we've written out the new but yet to clear rubbish due to inserts */ if (!*nl) { - if ((i = (winw - ccs < char_ins ? winw - ccs : char_ins)) == 0) - return; + i = (winw - ccs < char_ins) ? (winw - ccs) : char_ins; if (tccan(TCDEL) && (tcdelcost(i) <= i + 1)) tc_delchars(i); else { - SELECT_ADD_COST(i); + SELECT_ADD_COST(i); vcs += i; while (i-- > 0) putc(' ', shout); } return; -- Mason [G.C.W] mason@werple.mira.net.au Hurt...Agony...Pain...LOVE-IT