From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id AAA03721 for ; Thu, 14 Nov 1996 00:09:47 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id HAA27268; Wed, 13 Nov 1996 07:57:51 -0500 (EST) Resent-Date: Wed, 13 Nov 1996 07:57:51 -0500 (EST) From: Geoff Wing Message-Id: <199611131254.XAA03572@coral.primenet.com.au> Subject: zle_refresh patch - also see next message To: zsh-workers@math.gatech.edu (zsh-workers) Date: Wed, 13 Nov 1996 23:54:45 +1100 (EST) 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: <"e_gri3.0.-f6.ENSYo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2386 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Heyla, this adds a bit more checking - hopefully unnecessary. It's built on my previous patches zsh-workers/{2336,2351,2359} The message following this contains a bug fix for a stupid bug that have been causing some people trouble. *** zle_refresh.c.~3~ Sun Nov 10 16:01:03 1996 --- zle_refresh.c Wed Nov 13 23:50:34 1996 *************** *** 596,614 **** if (nbuf[vln] && *nbuf[vln]) zputc(*nbuf[vln], shout); else ! zputc(' ', shout); /* I don't think this should happen */ ! nl++; ! 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; } --- 596,618 ---- if (nbuf[vln] && *nbuf[vln]) zputc(*nbuf[vln], shout); else ! zputc(' ', shout); /* I don't think this should happen */ ! if (ln == vln) { /* better safe than sorry */ ! nl++; ! if (*ol) ! ol++; ! ccs = 1; ! } /* else hmmm... I wonder what happened */ } /* 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) { ! i = pptw - ccs; ! j = strlen(ol); ! nl += i; ! ol += (i > j ? j : i); /* if ol is too short, point it to '\0' */ ccs = pptw; } *************** *** 653,659 **** we can do, so we just dump out what we must and clear if we can */ if (!*ol) { i = (col_cleareol >= 0) ? col_cleareol : nllen; ! i -= ccs; zwrite(nl, i, 1, shout); vcs += i; if (col_cleareol >= 0) --- 657,663 ---- we can do, so we just dump out what we must and clear if we can */ if (!*ol) { i = (col_cleareol >= 0) ? col_cleareol : nllen; ! i -= vcs; zwrite(nl, i, 1, shout); vcs += i; if (col_cleareol >= 0) -- Geoff Wing [gwing@primenet.com.au] Technical Manager Phone : +61-3-9818 2977 PrimeNet - Internet Consultancy Facsimile: +61-3-9819 3788 Web : Mobile : 0412 162 441